简体   繁体   中英

pip install -r requirement.txt on ubuntu

I want to practice how to deploy my code from my mac to my ubuntu (virtualbox)

I have a requirement.txt like this:

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:

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

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.

try:

sudo apt-get install libxml2-dev libxslt-dev

before:

pip install lxml

Update: Removed python-dev from installation

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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