赞
踩
在Anaconda的虚拟环境中安装tensorflow2.5-gpu版本的时候,一直出现非网络问题的报错,显示多个包的版本依赖有问题。
- (tensorflow2.5-gpu) C:\Users\用户名>pip install C:\Users\用户名\Downloads\tensorflow-2.5.0-cp37-cp37m-win_amd64.whl
- Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
- Processing c:\users\用户名\downloads\tensorflow-2.5.0-cp37-cp37m-win_amd64.whl
- Collecting protobuf>=3.9.2
- Downloading https://pypi.tuna.tsinghua.edu.cn/packages/61/70/ee9585603255156d88f07528a6094733e37f8e3f72711b8583fcbb77d5ec/protobuf-4.24.4-cp37-cp37m-win_amd64.whl (430 kB)
- ---------------------------------------- 430.0/430.0 kB 1.8 MB/s eta 0:00:00
- Collecting google-pasta~=0.2
- Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a3/de/c648ef6835192e6e2cc03f40b19eeda4382c49b5bafb43d88b931c4c74ac/google_pasta-0.2.0-py3-none-any.whl (57 kB)
- ---------------------------------------- 57.5/57.5 kB 3.1 MB/s eta 0:00:00
- Collecting wrapt~=1.12.1
- Downloading https://pypi.tuna.tsinghua.edu.cn/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz (27 kB)
- Preparing metadata (setup.py) ... done
- Collecting typing-extensions~=3.7.4
- Downloading https://pypi.tuna.tsinghua.edu.cn/packages/60/7a/e881b5abb54db0e6e671ab088d079c57ce54e8a01a3ca443f561ccadb37e/typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
- Collecting six~=1.15.0
- Downloading https://pypi.tuna.tsinghua.edu.cn/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl (10 kB)
- ERROR: Ignored the following versions that require a different python version: 4.25.0rc1 Requires-Python >=3.8; 4.25.0rc2 Requires-Python >=3.8; 4.8.0 Requires-Python >=3.8; 4.8.0rc1 Requires-Python >=3.8
- ERROR: Could not find a version that satisfies the requirement keras-nightly~=2.5.0.dev (from tensorflow) (from versions: none)
- ERROR: No matching distribution found for keras-nightly~=2.5.0.dev
- WARNING: There was an error checking the latest version of pip.

后来发现无论换什么姿势,清华源安装总会报类似的错误,安装到一半报错
解决方法:换源
pip install tensorflow-gpu==2.5.0 -i https://pypi.org/simple/
换了多个源,上述这个最好使,安装过程很丝滑
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。