首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Python Django requirements.txt

Python Django requirements.txt
EN

Stack Overflow用户
提问于 2013-04-19 21:21:11
回答 3查看 52.1K关注 0票数 14

我有一个包含所有依赖项的requirements.txt文件,但它没有被正确处理:

pip install -r requirements.txt之后,我得到以下pip freeze

代码语言:javascript
复制
argparse==1.2.1
wsgiref==0.1.2

但是当我执行pip安装时:

代码语言:javascript
复制
numpy==1.6.2
Django==1.4.2
django-tastypie==0.9.14
pyes==0.19.1

然后运行我的pip install -r requirements.txt。然后它就起作用了。

下面是我的requirements.txt包含的内容:

代码语言:javascript
复制
numpy==1.6.2
Django==1.4.2
django-tastypie==0.9.14
urllib3==1.5
pyes==0.19.1
BeautifulSoup==3.2.1
MySQL-python==1.2.3
IMAPClient==0.9.1
Jinja2==2.6
Pillow==2.0.0
amqp==1.0.9
anyjson==0.3.3
billiard==2.7.3.22
celery==3.0.16
django-celery==3.0.11
django-compressor==1.3
django-concurrency
django-extensions==1.1.1
https://codeload.github.com/toastdriven/django-haystack/zip/master#egg=django-haystack
django-model-utils==1.2.0
django-multiforloop==0.2.1
django-social-auth==0.7.22
html5lib==0.95
httplib2==0.8
kombu==2.5.7
logilab-astng==0.24.2
logilab-common==0.59.0
oauth2==1.5.211
ordereddict==1.1
pycrypto==2.6
pylint==0.27.0
python-dateutil==1.5
python-openid==2.2.5
pytz==2013b
six==1.3.0
unittest2==0.5.1
wsgiref==0.1.2
xlrd==0.9.0
xmltodict==0.4.6
django-storages>=1.1.8
boto==2.8.0
lxml==3.1.0
pyelasticsearch==0.4.1
django-tastypie-elasticsearch==0.1.0

有人会有解决方案吗?

EN

回答 3

Stack Overflow用户

发布于 2013-10-08 08:49:41

我试过了,问题出在django-tastypie elasticsearch上。有一个已知的问题,如果还没有安装Django,用pip安装就会失败。以下是问题报告:

https://github.com/llonchj/django-tastypie-elasticsearch/issues/1

看起来django-tastypie elastic只有两个贡献者,所以你可能要靠自己了。好消息是这不是你的错!

票数 7
EN

Stack Overflow用户

发布于 2021-10-20 06:21:16

在mac上:

pip3 freeze > requirements.txt

来自:Automatically create requirements.txt

然后,如果您想要安装它们,并且您使用的是虚拟环境

pip3 install -r requirements.txt

来自:How can I install packages using pip according to the requirements.txt file from a local directory?

票数 2
EN

Stack Overflow用户

发布于 2013-04-19 22:30:28

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16105638

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档