问题描述
我有一个简单的问题.我已经使用anaconda安装了resampy
conda install -c conda-forge resampy
现在,当我将重新采样导入到python程序中时,它仍然返回错误消息导入错误:没有名为重新采样的模块但是康达说它已经安装好了.有人可以帮我解决我做错事情的地方吗?我遇到的主要困惑是:当我使用anaconda安装软件包时,它是否像通过pip安装的任何其他软件包一样安装?我可以像导入其他任何软件包一样导入和使用它吗?
请有人帮助我.
我有相同的经验,但是在Anaconda创建的PATH中,它没有包含通过conda install安装的软件包的完整路径.
作为解决方法,我使用:
导入系统sys.append(站点软件包目录的完整路径)
在我的情况下: sys.path.append("C:/Users/rpo/AppData/Local/conda/conda/envs/tweet/Lib/site-packages/")我在linux和Windows conda环境中都遇到过一个软件包的问题,我想这可能是软件包的特定问题.
I have a simple question. I have install resampy using anaconda
conda install -c conda-forge resampy
Now when I import resampy into my python program, it still returns the error saying Import Error: No module named resampyBut conda says it is installed. Can someone help me out where I'm doing something wrong?The major confusion that I come across is: When I install a package using anaconda, does it install just like any other package installed via pip? Can I import and use it just like any other package?
Please someone help me out of this.
I have the same experience, somehow in the PATHs that Anaconda created, it does not include the full path to the package installed via conda install.
As workaround, i use:
import syssys.append(full path to the site-package directory)
in my case:sys.path.append("C:/Users/rpo/AppData/Local/conda/conda/envs/tweet/Lib/site-packages/")
I experienced this for one package in both linux and windows conda environment, i guess could be package specific issue.
这篇关于无法导入安装在anaconda中的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!