我最近在我的 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) 中导入时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
如何在 conda 环境中安装 Selenium?How to install Selenium in a conda environment?(如何在 conda 环境中安装 Selenium?)
使用 Anaconda installe 在 Windows 上获取 CUDA 和 CUDNNget the CUDA and CUDNN version on windows with Anaconda installe(使用 Anaconda installe 在 Windows 上获取 CUDA 和 CUDNN 版本)
如何下载适用于 python 3.6 的 AnacondaHow can I download Anaconda for python 3.6(如何下载适用于 python 3.6 的 Anaconda)
使用两个不同的 Python 发行版Using two different Python Distributions(使用两个不同的 Python 发行版)
除了 OSX 上现有的 pyenv 安装之外,如何安装 AnaHow can I install Anaconda aside an existing pyenv installation on OSX?(除了 OSX 上现有的 pyenv 安装之外,如何安装 Anaconda?)
在 Cygwin 中为 Anaconda 永久设置 Python 路径Permanently set Python path for Anaconda within Cygwin(在 Cygwin 中为 Anaconda 永久设置 Python 路径)