在搭了梯子情况下下载TensorFlow,升级的是2.5.0版本
前面下载都可以,到了wrapt这一步时报错ERROR: Failed building wheel for wrapt
按教程去https://www.lfd.uci.edu/~gohlke/pythonlibs/#wrapt这里下载了我用的python3.6版本的wrpat,路径名称没错,但报错找不到文件
然后将文件改无中文的路径就可以了
接着下载TensorFlow,可以用清华镜像,非常快,梯子网速太慢了
https://pypi.tuna.tsinghua.edu.cn/simple/tensorflow-cpu/我用的cpu版本的,找到对应系统和Python版本的TensorFlow下载就可以了
问题又来了
socket.timeout: The read operation timed out
raise ReadTimeoutError(self._pool, None, 'Read timed out.')
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
而且运行以前的TensorFlow也有问题了
ImportError: Something is wrong with the numpy installation. While importing we detected an older version of numpy in ['C:\\Program Files\\Python36\\lib\\site-packages\\numpy']. One method of fixing this is to repeatedly uninstall numpy until none is found, then reinstall this version.
Process finished with exit code 1
numpy版本新旧都有需要删除干净再重下
C:\Users\朱玉媛>pip uninstall numpy
Cannot uninstall requirement numpy, not installed
You are using pip version 9.0.3, however version 21.1.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\朱玉媛>pip --default-timeout=100 install -U tensorflow
Collecting tensorflow
Using cached https://files.pythonhosted.org/packages/b8/f3/6e7c0712acf8f0293897bc66071709f7a2d7fedfd05d1a5c16851d20f08d/tensorflow-2.5.0-cp36-cp36m-win_amd64.whl
输入命令pip --default-timeout=100 install -U tensorflow
Collecting tensorflow
Using cached https://files.pythonhosted.org/packages/b8/f3/6e7c0712acf8f0293897bc66071709f7a2d7fedfd05d1a5c16851d20f08d/tensorflow-2.5.0-cp36-cp36m-win_amd64.whl
跑成功了