pip install tensorflow 对我不起作用

问题描述 投票:0回答:1

在 Windows 10 上的 VSCode 中使用新的 venv 并想要安装 matplotlib 和张量流 matplotlib 安装成功,但是张量流也没有尝试使用特定版本,但这也没有帮助

(.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

安装软件包时预计会出现类似的行为。 任何人都知道可能出了什么问题

python-3.x windows tensorflow pip python-venv
1个回答
0
投票

tensorflow目前支持Python 3.9 - 3.11。如果您没有任何受支持的版本,您可以从 https://www.python.org/downloads/windows/ 下载/安装它。 不要让 Python 将自身添加到 PATH 中,因为它真的会造成混乱

在您的计算机上安装支持的版本后,您可以创建虚拟环境。例如,您可以使用

python3.11 -m venv "my_env_name"
创建 python 3.11 虚拟环境,激活 venv,然后使用
pip install tensorflow
安装 TensorFlow。

© www.soinside.com 2019 - 2024. All rights reserved.