我正在尝试以正确的方式安装django-nonrel -,并能够再现流程。
我使用pip安装了django-nonrel,如下所示:
pip install git+https://github.com/django-nonrel/django-nonrel.git
pip install git+https://github.com/django-nonrel/django-dbindexer.git
pip install git+https://github.com/django-nonrel/django-permission-backend-nonrel
pip install hg+https://bitbucket.org/wkornewald/djangoappengine
pip install hg+https://bitbucket.org/wkornewald/djangotoolbox
pip install hg+https://bitbucket.org/twanschik/django-autoload
pip install hg+https://bitbucket.org/twanschik/nonrel-search/src安装之后,我得到了这个req.txt文件(pip冻结> req.txt):
Django==1.3.1
django-autoload==0.01
django-dbindexer==0.3
djangoappengine==1.0
djangotoolbox==0.9.2
nonrel-search==0.1
permission-backend-nonrel==0.1
wsgiref==0.1.2但我不能用我的req.txt文件获得同样的东西。如果我卸载一个包(例如django-autoload),并尝试使用requirements文件再次获得它
(gae-first)bentzy@lama:~/.virtualenvs/gae-first$ pip uninstall django-autoload
Uninstalling django-autoload:
...
Successfully uninstalled django-autoload
(gae-first)bentzy@lama:~/.virtualenvs/gae-first$ pip install -r req.txt
Requirement already satisfied (use --upgrade to upgrade): Django==1.3.1 in ./lib/python2.7/site-packages (from -r req.txt (line 1))
Downloading/unpacking django-autoload==0.01 (from -r req.txt (line 2))
Could not find any downloads that satisfy the requirement django-autoload==0.01 (from -r req.txt (line 2))
No distributions at all found for django-autoload==0.01 (from -r req.txt (line 2))
Storing complete log in /home/bentzy/.pip/pip.log为什么那些包不在pip存储库中?
使用pip安装它们还是有意义的吗?
发布于 2013-01-29 23:14:25
问题是您的需求文件没有足够的信息。
例如,当您请求pip安装django-autoload时,它要做的就是查看该包的PyPI (并在找到PyPI条目后丢弃一些页面)。
如果您希望有一个需求文件,该文件可以像安装时一样下载这些包,那么也要这样做:告诉pip在哪里可以找到包。
创建一个需求文件,如:
git+https://github.com/django-nonrel/django-nonrel.git
git+https://github.com/django-nonrel/django-dbindexer.git
git+https://github.com/django-nonrel/django-permission-backend-nonrel
hg+https://bitbucket.org/wkornewald/djangoappengine
hg+https://bitbucket.org/wkornewald/djangotoolbox
hg+https://bitbucket.org/twanschik/django-autoload
hg+https://bitbucket.org/twanschik/nonrel-search/src或者,如果要从特定标记或提交安装,请执行以下操作:
git+https://github.com/django-nonrel/django-nonrel.git@1.3.1#egg=Django在http://www.pip-installer.org/en/latest/logic.html#requirements-file-format上阅读更多关于需求文件的信息
发布于 2013-01-29 17:30:29
如果您使用的是GAE,那么使用pip是没有意义的,因为您使用的所有包都需要在实际的GAE项目文件夹中。安装在系统或虚拟环境中的包不会上传到GAE生产服务器。
https://stackoverflow.com/questions/14585938
复制相似问题