如何在virtualenv的site-packages中安装软件包,并将命令放在将从本地目录安装此软件包的requirements.txt中?

时间:2014-03-14 17:37:06

标签: python django pip easy-install django-oscar

我有一些像django-oscar这样的django软件包。我需要用pip安装它然后编辑代码&修改。

我尝试通过setup.py deploy安装它并制作.egg-info。然后我明白pip没有通过.egg-info安装软件包的功能。

我还尝试使用-e /path/to/package从本地目录安装软件包,但是pip不允许我从目录安装。它给我留言:--editable=src/django-oscar-master/oscar/ should be formatted with svn+URL, git+URL, hg+URL or bzr+URL

然后我尝试通过pip install django-oscar --no-index --find-links=file://src/django-oscar-master/和类似的命令安装。它总是给我留言:Could not find any downloads that satisfy the requirement django-oscar

如何安装不在virtualenv的site-packages中的软件包,并将命令放在requirements.txt中,从本地目录安装此软件包?

1 个答案:

答案 0 :(得分:1)

这不是pip的设计目的。您应该将您的django-oscar版本发布到github,然后在您的pip requirements.txt中引用它

或者,如果您不希望将其托管为远程,您可以将其包含在项目目录中,就像您正在制作的Django应用程序一样。