python - 在没有互联网连接的情况下安装 python 包
问题描述
我需要在没有互联网接入的机器上安装带有 pip 的 python 包。为此,我尝试从以下链接下载这些软件包:https://www.lfd.uci.edu/~gohlke/pythonlibs/ 我认为 whl 文件是完整的软件包,但是当我尝试使用 pip 安装时,我得到了以下错误
点安装 .\pyproj-3.2.1-cp310-cp310-win_amd64.whl
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewC
onnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000000F76ABA6EC0>: Failed to establish a new
connection: [WinError 10061] No connection could be made because the target machine actively refused it')':
ERROR: Could not find a version that satisfies the requirement certifi (from pyproj) (from versions: none)
ERROR: No matching distribution found for certifi
我需要安装的软件包是:
- 麻木的
- GDAL
- 项目
- 菲奥娜
- 匀称
- 地理熊猫
我也尝试在具有互联网连接的本地计算机上使用 pip 下载,但是当我尝试使用生成的 whl 时,我遇到了同样的问题
我应该如何继续安装这些软件包?
解决方案
像这样
pip install --no-index --find-links=<lolcal-folder> <package-name>
例如
pip install --no-index --find-link=/tmp/python-wheels exchangelib
推荐阅读
- java - 向列表中添加第二项似乎会覆盖我添加的第一个元素
- javascript - 电子
: Uncaught SyntaxError: Unexpected token - php - 调用未定义的方法 Silverstripe Gridfield
- java - 你如何从一个方法返回一个值并在另一个方法中调用它?
- c# - 文件上传到 dotnetcore api 不适用于红隼套接字异常
- python-3.x - 将 int 和 str 与 print 一起使用
- python - 为什么元组解包可以在使用两行时提供正确的结果?
- python - 如何对一组相似的产品名称进行分组?
- c++ - fopen 几分钟后无法打开文件
- reactjs - 在 React 中的光标位置插入文本