我最近在我的 Conda 中安装了 pybedtools环境,使用他们提到的命令 -
I recently installed pybedtools in my Conda environment, using the command they mentioned -
conda install -c bioconda pybedtools
但是当我在这个环境中激活 spyder 并尝试运行 import pybedtools
它给了我错误-
But then when I activated spyder in this environment, and tried to run import pybedtools
it gave me the error-
Modulenotfounderror: no module named 'pybedtools'
我回去尝试使用 pip
的模块进行安装(pip install pybedtools
)但它说我已经有了它 -
I went back and tried to install using the module using pip
too (pip install pybedtools
) but it said that I already had it -
要求已经满足:/anaconda3/envs/env1/lib/python3.5/site-packages 中的 pybedtools已满足要求:./anaconda3/envs/env1/lib/python3.5/site-packages 中的六个(来自 pybedtools)
所以,我无法理解模块是如何安装的,但 Spyder 不允许我导入它.我以前从未遇到过 Anaconda 的这个问题.任何帮助都会很棒!
So, I am unable to understand how it is that the module is installed yet Spyder does not allow me to import it. I have never faced this issue with Anaconda before. Any help would be great!
这是我解决问题的方法 -
Here is how I was able to solve the issue -
root
环境.这可以通过 Windows 中的 activate root
和 Ubuntu/Mac 中的 source activate root
来完成root
environment. This can be done by activate root
in Windows and source activate root
in Ubuntu/Mac不过,我很想知道为什么这种方法有效!
I would love to know, though, why this method works!
这篇关于模块安装在 Conda 上,但在 Spyder (Python IDE) 中导入时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!