安裝-r requirement.txt我要練習如何從我的MAC我的代碼部署到我的Ubuntu(VirtualBox的)PIP在Ubuntu
我有這樣的requirement.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.tx被龍頭安裝t
有人可以告訴我下一步該怎麼做嗎?這是否意味着我必須逐一安裝它們?
首先,不要做'須藤PIP安裝-r'在你的虛擬環境。這裏的問題是你的文件編碼不正確,你是如何在你的Mac上創建它的? – 2014-09-02 07:35:59
回溯表明您的虛擬環境未激活。放下'sudo'。 '哪個pip'應該*不*返回'/ usr/bin/pip'。 – jfs 2014-09-07 22:30:37