Python没有从dist-packages中找到模块

时间:2015-08-02 03:27:22

标签: python linux debian

Debian,Python 2.7

我已经安装了一个模块,但Python没有看到它,而IPython也是如此。调查显示所有外部模块都安装在\usr\local\lib\python2.7\dist-packages

Python的sys.path

Python 2.7.10 (default, Jul 11 2015, 09:39:24)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages']

IPython的' S

Python 2.7.3 (default, Mar 14 2014, 11:57:14)
Type "copyright", "credits" or "license" for more information.

IPython 3.2.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import sys; print sys.path
['', '/usr/local/bin', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/pymodules/python2.7', '/usr/local/lib/python2.7/dist-packages/IPython/extensions', '/root/.ipython']

我该如何解决?

现在我看到,我有两个Python 2.7安装。我如何解决它?如果我卸载其中一个会有帮助吗?怎么做?

如何为2.7.10安装pip安装包?

0 个答案:

没有答案