简体   繁体   English

在ubuntu上pip install -r requirements.txt

[英]pip install -r requirement.txt on ubuntu

I want to practice how to deploy my code from my mac to my ubuntu (virtualbox) 我想练习如何将代码从Mac部署到ubuntu(virtualbox)

I have a requirement.txt like this: 我有一个require.txt像这样:

Django==1.6.4
Fabric==1.8.3
FormEncode==1.2.6
Pillow==2.4.0
SQLAlchemy==0.9.4
SQLObject==1.6.0
Scrapy==0.22.2
South==0.8.4
Tempita==0.5.2
Twisted==13.2.0
argparse==1.2.1
cffi==0.8.2
cryptography==0.3
cssselect==0.9.1
decorator==3.4.0
django-mongodb-engine==0.5.1
djangotoolbox==1.6.2
ecdsa==0.11
fexpect==0.2.post17
lxml==3.3.4
......

When I use sudo pip install -r requirement.txt in my virtualenv There is error below: 当我在virtualenv中使用sudo pip install -r requirement.txt ,出现以下错误:

Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 185, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 51: ordinal not in range(128)

And I ckeck pip freeze There is nothing being intalled in requirement.txt 而且我会pip freeze require.txt中没有安装任何内容

Can someone tell me how to do next? 有人可以告诉我下一步该怎么做吗? Does it mean that I have to install them one by one? 这是否意味着我必须一个一个地安装它们?

Installing lxml normally requires a few extra bits and pieces. 安装lxml通常需要一些额外的lxml

try: 尝试:

sudo apt-get install libxml2-dev libxslt-dev

before: 之前:

pip install lxml

Update: Removed python-dev from installation 更新:从安装中删除了python-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM