2012-05-13 192 views
2

我正在尝试从github安装Exscript。Pip安装但未找到模块

pip install -e 'git+git://github.com/knipknap/exscript.git#egg=Exscript' 
... 
Successfully installed Exscript 
Cleaning up.. 

当我尝试加载它,蟒蛇是不是能够找到它:

python2.7 -c "import Exscript" 
Traceback (most recent call last): 
File "<string>", line 1, in <module> 
ImportError: No module named Exscript 

但是,当我尝试在相同的virtualenv通过setup.py它安装并加载成功安装。

我在做什么错了?

+2

如果安装有它你检查'site.packages'文件夹时使用? – dav1d

+0

pip在当前目录下留下一个'src'文件夹。据我所见,pip未能在'site-packages'中安装软件包,只是在那里留下一个鸡蛋链接。奇怪... – ubik

回答

2

标志-e的意思是“编辑”,会发生什么,幕后是一个符号,和我看到的,Exscript使用名为src目录,什么没见过一个很好的做法[1]。

因此,为了解决你的问题,你有两个选择:

  1. 删除-e标志
  2. 变化Exscript摆脱src,并使用另一个目录名

取看看http://guide.python-distribute.org/creation.html#directory-layouthttps://web.archive.org/web/20160601051350/https://pythonhosted.org/setuptools/setuptools.html#development-mode

[1]:好的做法是有目录相同的名称导入包

+0

这两个链接都关闭了 –