尽管我已经离线下载了.whl软件包,但是由于它需要连接到pypi服务器,所以我无法离线安装它。我该怎么办?
我已经从PyPI下载了该软件包并尝试安装它。想再次连接到网络真的很奇怪。我该如何解决?
pip install Keras-2.2.4-py2.py3-none-any.whl --user
我希望它会安装它。但是,以下消息表明它需要连接到网络。
消息:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x00000230B937FA20>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/keras-preprocessing/
ERROR: Could not find a version that satisfies the requirement keras-preprocessing>=1.0.5 (from Keras==2.2.4) (from versions: none)
ERROR: No matching distribution found for keras-preprocessing>=1.0.5 (from Keras==2.2.4)
答案 0 :(得分:0)
尝试指定相对或绝对路径。
Linux:
pip install ./Keras-2.2.4-py2.py3-none-any.whl --user
或
pip install /my/path/to/Keras-2.2.4-py2.py3-none-any.whl --user
Windows:
pip install .\Keras-2.2.4-py2.py3-none-any.whl --user
或
pip install C:\my\path\to\Keras-2.2.4-py2.py3-none-any.whl --user