python-3.x pip install tensorflow不适合我

biswetbf  于 12个月前  发布在  Python
关注(0)|答案(1)|浏览(164)

在Windows 10上的VSCode中使用新的venv,并希望安装matplotlib和tensorflow matplotlib安装成功,但tensorflow也没有尝试使用特定版本,但这也没有帮助

(.venv) PS D:\PY_Projects\Test> **pip install matplotlib**
Collecting matplotlib
  Using cached matplotlib-3.8.2-cp312-cp312-win_amd64.whl.metadata (5.9 kB)
Collecting contourpy>=1.0.1 (from matplotlib)
  Using cached contourpy-1.2.0-cp312-cp312-win_amd64.whl.metadata (5.8 kB)
Collecting cycler>=0.10 (from matplotlib)
....
....
Installing collected packages: six, pyparsing, pillow, packaging, numpy, kiwisolver, fonttools, cycler,   python-dateutil, contourpy, matplotlib
Successfully installed contourpy-1.2.0 cycler-0.12.1 fonttools-4.47.0 kiwisolver-1.4.5 matplotlib-3.8.2 numpy-1.26.3 packaging-23.2 pillow-10.2.0 pyparsing-3.1.1 python-dateutil-2.8.2 six-1.16.0
(.venv) PS D:\PY_Projects\Test> **pip install tensorflow**
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
(.venv) PS D:\PY_Projects\Test> **pip install tensorflow==2.14.0**
ERROR: Could not find a version that satisfies the requirement tensorflow==2.14.0 (from versions: none)
ERROR: No matching distribution found for tensorflow==2.14.0

字符串
在安装软件包时会出现类似的行为。有人知道可能出了什么问题吗

uurity8g

uurity8g1#

tensorflow目前支持Python 3.9 - 3.11。如果你没有任何支持的版本,你可以从https://www.python.org/downloads/windows/下载/安装它。不要让Python将自己添加到PATH中,因为它真的会混淆事情
在机器上安装支持的版本后,您可以创建虚拟环境。例如,您可以使用python3.11 -m venv env/place/you/want/to/save/to创建python 3.11虚拟环境,激活venv,然后使用python -m pip install tensorflow安装tensorflow。

相关问题