问题描述
1.问题一
pip安装whl文件报错,提示:
ERROR: tensorflow-1.13.1-cp37-cp37m-linux_x86_64-gcc8.whl is not a supported wheel on this platform.
2.问题二
pip安装过程中报错,提示:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pip-20.0.1-py3.7.egg/pip/_vendor/urllib3/response.py", line 425, in _error_catcher
yield
File "/usr/local/lib/python3.7/dist-packages/pip-20.0.1-py3.7.egg/pip/_vendor/urllib3/response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "/usr/local/lib/python3.7/dist-packages/pip-20.0.1-py3.7.egg/pip/_vendor/cachecontrol/filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "/usr/lib/python3.7/http/client.py", line 465, in read
n = self.readinto(b)
File "/usr/lib/python3.7/http/client.py", line 509, in readinto
n = self.fp.readinto(b)
File "/usr/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/lib/python3.7/ssl.py", line 1071, in recv_into
return self.read(nbytes, buffer)
File "/usr/lib/python3.7/ssl.py", line 929, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out
解决方法
1.whl文件名的问题,将文件重命名,去掉“-gcc8”即可,指令如下所示:
pip install tensorflow-1.13.1-cp37-cp37m-linux_x86_64.whl
2.网络不好超时问题,只需要添加清华源即可:
pip install tensorflow-1.13.1-cp37-cp37m-linux_x86_64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple

本文介绍了如何解决pip在安装whl文件时遇到的两个问题:一是文件名包含特殊字符导致的错误,二是网络超时问题。解决方法包括重命名whl文件和使用清华源。


被折叠的 条评论
为什么被折叠?



