昨天在新的電競桌機安裝好 NVIDIA 顯示卡的 CUDA 函式庫後, 順利安裝好 GPU 版的 PyTorch. 想說接著就來安裝 GPU 版的 TensorFlow 吧! 指令如下 :
pip install tensorflow-gpu
參考 :
但這回卻出現錯誤 :
C:\Users\USER>pip install 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.metadata (1.7 kB)
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\USER\AppData\Local\Temp\pip-install-k8fazmsx\tensorflow-gpu_379ac048cb9c49a387dd64f61929c840\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
搜尋 "tensorflow gpu subprocess-exited-with-error" 發現, 原來 tensorflow-gpu 套件已經不存在了, 安裝 tensorflow 套件即可, 因為 tensorflow 已支援 CUDA 加速運算, 參考 :
沒有留言 :
張貼留言