如何在python中激活虚拟环境时使用pip-install



我在CentOs7上安装了一个独立的python版本,并基于它激活了虚拟环境。当我从离线包中使用pip install方法时,我得到了这个错误:

ERROR: Command errored out with exit status 127:
command: /home/awagdy/Documents/reporter-web/venv/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jlfbivgb/Django/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jlfbivgb/Django/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'rn'"'"', '"'"'n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
cwd: /tmp/pip-install-jlfbivgb/Django/
Complete output (1 lines):
/home/awagdy/Documents/reporter-web/venv/bin/python3.7: error while loading shared libraries: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 127: python setup.py egg_info Check the logs for full command output.

我从包含使用命令pip download下载的所需软件包的文件夹进行安装,然后使用pip install -r requirements.txt --no--index --find-links=pkgs脱机安装它们

下面的链接,该人员建议使用在虚拟环境中安装python包时的easy_install

示例

使用此命令有助于path/to/python/python3.6 -m pip install -r requirements.txt --no-index --find-links=path/to/pkgs

最新更新