安装'tensorflow-gpu'尝试下载每个版本

whhtz7ly  于 2023-02-16  发布在  其他
关注(0)|答案(1)|浏览(222)

我正在关注一个关于如何在Tensorflow中进行音频分类的YouTube视频。在视频过程中,我被要求下载这些依赖项

pip install tensorflow tensorflow-gpu tensorflow-io matplotlib

作为一个很好的练习,我创建了一个venv,并让我的Jupyter笔记本使用它。不过我注意到,它试图下载tensorflow-gpu的每个版本,这可能会变得相当大

(venv) c:\users\myuser\myproject>pip install tensorflow tensorflow-gpu tensorflow-io matplotlib
Collecting tensorflow
  Downloading tensorflow-2.11.0-cp39-cp39-win_amd64.whl (1.9 kB)
Collecting tensorflow-gpu
  Downloading tensorflow_gpu-2.10.1-cp39-cp39-win_amd64.whl (455.9 MB)
     |████████████████████████████████| 455.9 MB 106 kB/s
Collecting tensorflow-io
  Downloading tensorflow_io-0.28.0-cp39-cp39-win_amd64.whl (22.9 MB)
     |████████████████████████████████| 22.9 MB 6.4 MB/s
Collecting matplotlib
  Downloading matplotlib-3.6.2-cp39-cp39-win_amd64.whl (7.2 MB)
     |████████████████████████████████| 7.2 MB 2.2 MB/s
Collecting tensorflow-intel==2.11.0
  Downloading tensorflow_intel-2.11.0-cp39-cp39-win_amd64.whl (266.3 MB)
     |████████████████████████████████| 266.3 MB 3.3 MB/s
Requirement already satisfied: setuptools in c:\users\myuser\myproject\venv\lib\site-packages (from tensorflow-intel==2.11.0->tensorflow) (57.4.0)
Collecting packaging
  Downloading packaging-22.0-py3-none-any.whl (42 kB)
     |████████████████████████████████| 42 kB 3.2 MB/s
Collecting protobuf<3.20,>=3.9.2
  Using cached protobuf-3.19.6-cp39-cp39-win_amd64.whl (895 kB)
Collecting wrapt>=1.11.0
  Using cached wrapt-1.14.1-cp39-cp39-win_amd64.whl (35 kB)
Collecting termcolor>=1.1.0
  Downloading termcolor-2.1.1-py3-none-any.whl (6.2 kB)
Collecting flatbuffers>=2.0
  Downloading flatbuffers-22.12.6-py2.py3-none-any.whl (26 kB)
Collecting gast<=0.4.0,>=0.2.1
  Downloading gast-0.4.0-py3-none-any.whl (9.8 kB)
Collecting absl-py>=1.0.0
  Using cached absl_py-1.3.0-py3-none-any.whl (124 kB)
Collecting tensorflow-io-gcs-filesystem>=0.23.1
  Downloading tensorflow_io_gcs_filesystem-0.28.0-cp39-cp39-win_amd64.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 3.3 MB/s
Collecting google-pasta>=0.1.1
  Downloading google_pasta-0.2.0-py3-none-any.whl (57 kB)
     |████████████████████████████████| 57 kB ...
Collecting typing-extensions>=3.6.6
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Collecting tensorboard<2.12,>=2.11
  Downloading tensorboard-2.11.0-py3-none-any.whl (6.0 MB)
     |████████████████████████████████| 6.0 MB 3.3 MB/s
Collecting astunparse>=1.6.0
  Downloading astunparse-1.6.3-py2.py3-none-any.whl (12 kB)
Collecting keras<2.12,>=2.11.0
  Downloading keras-2.11.0-py2.py3-none-any.whl (1.7 MB)
     |████████████████████████████████| 1.7 MB 3.2 MB/s
Collecting libclang>=13.0.0
  Downloading libclang-14.0.6-py2.py3-none-win_amd64.whl (14.2 MB)
     |████████████████████████████████| 14.2 MB 3.3 MB/s
Collecting opt-einsum>=2.3.2
  Downloading opt_einsum-3.3.0-py3-none-any.whl (65 kB)
     |████████████████████████████████| 65 kB 1.8 MB/s
Collecting h5py>=2.9.0
  Downloading h5py-3.7.0-cp39-cp39-win_amd64.whl (2.6 MB)
     |████████████████████████████████| 2.6 MB 6.8 MB/s
Collecting tensorflow-estimator<2.12,>=2.11.0
  Downloading tensorflow_estimator-2.11.0-py2.py3-none-any.whl (439 kB)
     |████████████████████████████████| 439 kB 3.3 MB/s
Collecting six>=1.12.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting grpcio<2.0,>=1.24.3
  Downloading grpcio-1.51.1-cp39-cp39-win_amd64.whl (3.7 MB)
     |████████████████████████████████| 3.7 MB 6.8 MB/s
Collecting numpy>=1.20
  Downloading numpy-1.23.5-cp39-cp39-win_amd64.whl (14.7 MB)
     |████████████████████████████████| 14.7 MB 3.3 MB/s
Collecting tensorflow-gpu
  Downloading tensorflow_gpu-2.10.0-cp39-cp39-win_amd64.whl (455.9 MB)
     |████████████████████████████████| 455.9 MB 3.2 MB/s
  Downloading tensorflow_gpu-2.9.3-cp39-cp39-win_amd64.whl (444.1 MB)
     |████████████████████████████████| 444.1 MB 60 kB/s
  Downloading tensorflow_gpu-2.9.2-cp39-cp39-win_amd64.whl (444.1 MB)
     |████████████████████████████████| 444.1 MB 10 kB/s
  Downloading tensorflow_gpu-2.9.1-cp39-cp39-win_amd64.whl (444.0 MB)
     |████████████████████████████████| 444.0 MB 12 kB/s
  Downloading tensorflow_gpu-2.9.0-cp39-cp39-win_amd64.whl (444.0 MB)
     |████████████████████████████████| 444.0 MB 3.3 MB/s
  Downloading tensorflow_gpu-2.8.4-cp39-cp39-win_amd64.whl (438.4 MB)
     |████████████████████████████████| 438.4 MB 84 kB/s
Collecting keras-preprocessing>=1.1.1
  Downloading Keras_Preprocessing-1.1.2-py2.py3-none-any.whl (42 kB)
     |████████████████████████████████| 42 kB 3.2 MB/s
Collecting tensorflow-gpu
  Downloading tensorflow_gpu-2.8.3-cp39-cp39-win_amd64.whl (438.4 MB)
     |████████████████████████████████| 438.4 MB 4.5 kB/s
  Downloading tensorflow_gpu-2.8.2-cp39-cp39-win_amd64.whl (438.3 MB)
     |████████████████████████████████| 438.3 MB 17 kB/s
  Downloading tensorflow_gpu-2.8.1-cp39-cp39-win_amd64.whl (438.3 MB)
     |████████████████████████████████| 438.3 MB 6.4 MB/s
  Downloading tensorflow_gpu-2.8.0-cp39-cp39-win_amd64.whl (438.0 MB)

ERROR: Operation cancelled by user
WARNING: You are using pip version 21.2.3; however, version 22.3.1 is available.

为什么需要下载每个Tensorflow GPU版本?

nr7wwzry

nr7wwzry1#

事实上,正如@Dr. Snoopy在他的评论中提到的,你不需要同时安装tensorflow(CPU)或tensorflow-gpu(GPU)模式,你可以按照以下方式安装其中一种:

!pip install tensorflow-io tensorflow-gpu==2.10 matplotlib #Tensorflow 2.11 is not supported for native-Windows

!pip install tensorflow-io tensorflow matplotlib

相关问题