我尝试在我的机器上安装“Tensorflow-gpu”。我使用此链接来安装它。但是,我在安装时遇到了错误。
Collecting tensorflow-gpu
Downloading tensorflow-gpu-2.12.0.tar.gz (2.6 kB)
Preparing metadata (setup.py) ... done
Collecting python_version>"3.7" (from tensorflow-gpu)
Downloading python_version-0.0.2-py2.py3-none-any.whl (3.4 kB)
Building wheels for collected packages: tensorflow-gpu
Building wheel for tensorflow-gpu (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\abc\AppData\Local\Temp\pip-install-0lpp6h9f\tensorflow-gpu_44915b75a9dd4b33b8859b0ec8d0fabe\setup.py", line 37, in <module>
raise Exception(TF_REMOVAL_WARNING)
Exception:
=========================================================
The "tensorflow-gpu" package has been removed!
Please install "tensorflow" instead.
Other than the name, the two packages have been identical
since TensorFlow 2.1, or roughly since Sep 2019. For more
information, see: pypi.org/project/tensorflow-gpu
=========================================================
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tensorflow-gpu
Running setup.py clean for tensorflow-gpu
Failed to build tensorflow-gpu
ERROR: Could not build wheels for tensorflow-gpu, which is required to install pyproject.toml-based projects
为什么我无法安装?
错误消息和 PyPi 页面都表明
tensorflow-gpu
不再是活动包,您应该安装 tensorflow
。所以...就这么做吧。