gunicorn安装报错
ceshi.txt 有写需要安装的库: gunicorn==18.0
执行安装命令:pip install --no-index --find-links=whls -r ./ceshi.txt --target=2env/lib/python2.7/site-packages
Ignoring indexes: https://pypi.python.org/simple
Collecting gunicorn==18.0 (from -r ./ceshi.txt (line 1))
Installing collected packages: gunicorn
Successfully installed gunicorn
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 367, in run
for item in os.listdir(lib_dir):
OSError: [Errno 2] No such file or directory: '/tmp/tmpxRIPvt/lib64/python'
解决办法:
"/usr/lib/python2.7/site-packages/pip/commands/install.py", line 367
注释掉:lib_dir = lib_dir.replace("lib","lib64") -->先前安装 pycryptodomex 或其他库时报类似上面的错误而增加的这一行
例:install.py的367行前后的内容如下
if options.target_dir:
ensure_dir(options.target_dir)
lib_dir = distutils_scheme('', home=temp_target_dir)['purelib']
#lib_dir = lib_dir.replace("lib","lib64")