pip install -r requirement.txt在ubuntu上

时间:2014-09-02 07:15:00

标签: python ubuntu pip

我想练习如何将我的代码从我的mac部署到我的ubuntu(virtualbox)

我有这样的requirements.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
......

当我在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)

我ckeck pip freeze在requirement.txt

中没有任何内容

有人可以告诉我下一步怎么办?这是否意味着我必须逐个安装它们?

1 个答案:

答案 0 :(得分:2)

安装lxml通常需要额外的一些零碎。

尝试:

sudo apt-get install libxml2-dev libxslt-dev

之前:

pip install lxml

<强>更新 已从安装中删除python-dev