【发布时间】:2014-04-20 03:51:18
【问题描述】:
我有一些 django 包,例如 django-oscar。我需要用 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 中,这将从本地目录安装此包?
【问题讨论】:
-
这并不是 pip 的设计初衷。您应该将您的 django-oscar 版本发布到 github,然后在您的 pip requirements.txt 中引用它
-
我可以通过
easy_install或setuptools等其他工具来完成吗?因为我没有机会将它存储在外部存储库中。 -
你不妨把它包含在你的项目目录中,就像你正在制作一个 Django 应用一样。
-
是的,但在这种情况下,嵌套在 django-oscar 中的应用程序由于某种原因未安装。我不知道为什么,只是迁移脚本没有为应用程序运行。
-
stormlifter 你在我的问题上得到了回答。问题解决了。非常感谢。您可以将此添加为答案
标签: python django pip easy-install django-oscar