This question already has an answer here:
Anaconda not finding my packages installed with `pip`
                                
                                    (1个答案)
                                
                        
                                3年前关闭。
            
                    
我在了解在计算机(https://github.com/dgilland/omdb.py)中安装omdb模块时发生了什么问题。

我通过终端安装使用:

pip install omdb


然后,我创建了一个简单的python脚本来测试它是否可以正确导入:

import matplotlib
import omdb

print omdb.get(title='A Beautiful Mind', fullplot=True, tomatoes=True)


当我在终端中使用python时,脚本运行完美:

python movies.py


但是后来我尝试将ipython与Anaconda一起使用,并且总是收到以下消息:

ImportError: no module named omdb


还有另一种安装模块的方法,还是我缺少有关Anaconda和Python的东西?
我想要的只是能够使用omdb。我正在使用Python 2.7.11-0和OS X 10.9.5。任何帮助表示赞赏

最佳答案

这是因为Anaconda installed packages aren't stored into a Python library,它有自己的仓库。因此,您应该使用the command for it

conda install omdb



  Anaconda附带了一个名为conda的软件包管理器。它还兼任虚拟环境管理器。
  
  Python软件包管理器是pip,它只是一个软件包管理器,您将必须安装virtualenv才能管理虚拟环境。

09-25 17:50
查看更多