python - 如何在python中激活虚拟环境时使用pip install
问题描述
我已经安装了一个单独的python版本并基于它激活了虚拟环境,CentOs7
当我使用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('"'"'\r\n'"'"', '"'"'\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
解决方案
下面的链接,该人建议
easy_install
在虚拟环境中安装python包时使用
推荐阅读
- azure-functions - 暂停/禁用 Azure 逻辑应用函数上的计时器 - 触发器和函数之间的区别?
- python - 将数据库文件中的表连接到 python
- rust - Rust Diesel 无法编译并出现链接器错误
- c++ - Windows 控制台应用程序 - 是否可以检测(并处理)窗口关闭 (X) 按钮被点击?
- .net - 从 Web Api Project 调用 Api 的最佳方式
- swift - 为什么我不能编辑按钮形状?
- javascript - 未捕获的 DOMException:无法在“CSSStyleSheet”上执行“addRule”:无法访问 StyleSheet 以插入规则
- python - 谁能告诉我我的代码中缺少什么,我不能使用不和谐的用户名
- c# - ASP.NET Core WebApi 身份验证
- javascript - .val() equals multiple values