今天打算要安装tensorflow,结果就遇到事情了。。。。
pip安装tensorflow
pip install tensorflow
结果翻车了
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.6.0 requires grpcio<2.0,>=1.37.0, but you have grpcio 1.34.1 which is incompatible.
tensorflow 2.6.0 requires tensorflow-estimator~=2.6, but you have tensorflow-estimator 2.5.0 which is incompatible.
我的显卡是GeForce 3060 cuda版本是11.4
看样子是numpy的版本太老了
注:下载最新版本的库建议将有关库都更新一下
pip install numpy
在运行安装tensorflow
pip install tensorflow
报告
(venv) D:\python-openCV>pip install --upgrade tensorFlow
Requirement already satisfied: tensorFlow in d:\python-opencv\venv\lib\site-packages (2.6.0)
Requirement already satisfied: gast==0.4.0 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (0.4.0)
Requirement already satisfied: clang~=5.0 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (5.0)
Requirement already satisfied: google-pasta~=0.2 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (0.2.0)
Requirement already satisfied: six~=1.15.0 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (1.15.0)
Requirement already satisfied: numpy~=1.19.2 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (1.19.5)
Requirement already satisfied: termcolor~=1.1.0 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (1.1.0)
Requirement already satisfied: astunparse~=1.6.3 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (1.6.3)
Requirement already satisfied: wrapt~=1.12.1 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (1.12.1)
Requirement already satisfied: typing-extensions~=3.7.4 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (3.7.4.3)
Requirement already satisfied: flatbuffers~=1.12.0 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (1.12)
Requirement already satisfied: grpcio<2.0,>=1.37.0 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (1.39.0)
Requirement already satisfied: tensorflow-estimator~=2.6 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (2.6.0)
Requirement already satisfied: tensorboard~=2.6 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (2.6.0)
Requirement already satisfied: opt-einsum~=3.3.0 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (3.3.0)
Requirement already satisfied: protobuf>=3.9.2 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (3.17.3)
Requirement already satisfied: keras~=2.6 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (2.6.0)
Requirement already satisfied: absl-py~=0.10 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (0.13.0)
Requirement already satisfied: h5py~=3.1.0 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (3.1.0)
Requirement already satisfied: keras-preprocessing~=1.1.2 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (1.1.2)
Requirement already satisfied: wheel~=0.35 in d:\python-opencv\venv\lib\site-packages (from tensorFlow) (0.37.0)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in d:\python-opencv\venv\lib\site-packages (from tensorboard~=2.6->tensorFlow) (1.8.0)
Requirement already satisfied: requests<3,>=2.21.0 in d:\python-opencv\venv\lib\site-packages (from tensorboard~=2.6->tensorFlow) (2.26.0)
Requirement already satisfied: markdown>=2.6.8 in d:\python-opencv\venv\lib\site-packages (from tensorboard~=2.6->tensorFlow) (3.3.4)
Requirement already satisfied: google-auth<2,>=1.6.3 in d:\python-opencv\venv\lib\site-packages (from tensorboard~=2.6->tensorFlow) (1.34.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in d:\python-opencv\venv\lib\site-packages (from tensorboard~=2.6->tensorFlow) (0.4.5)
Requirement already satisfied: setuptools>=41.0.0 in d:\python-opencv\venv\lib\site-packages (from tensorboard~=2.6->tensorFlow) (57.4.0)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in d:\python-opencv\venv\lib\site-packages (from tensorboard~=2.6->tensorFlow) (0.6.1)
Requirement already satisfied: werkzeug>=0.11.15 in d:\python-opencv\venv\lib\site-packages (from tensorboard~=2.6->tensorFlow) (2.0.1)
Requirement already satisfied: pyasn1-modules>=0.2.1 in d:\python-opencv\venv\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.6->tensorFlow) (0.2.8)
Requirement already satisfied: rsa<5,>=3.1.4 in d:\python-opencv\venv\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.6->tensorFlow) (4.7.2)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in d:\python-opencv\venv\lib\site-packages (from google-auth<2,>=1.6.3->tensorboard~=2.6->tensorFlow) (4.2.2)
Requirement already satisfied: requests-oauthlib>=0.7.0 in d:\python-opencv\venv\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.6->tensorFlow) (1.3.0)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in d:\python-opencv\venv\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<2,>=1.6.3->tensorboard~=2.6->tensorFlow) (0.4.8)
Requirement already satisfied: idna<4,>=2.5 in d:\python-opencv\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard~=2.6->tensorFlow) (3.2)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in d:\python-opencv\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard~=2.6->tensorFlow) (1.26.6)
Requirement already satisfied: charset-normalizer~=2.0.0 in d:\python-opencv\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard~=2.6->tensorFlow) (2.0.4)
Requirement already satisfied: certifi>=2017.4.17 in d:\python-opencv\venv\lib\site-packages (from requests<3,>=2.21.0->tensorboard~=2.6->tensorFlow) (2021.5.30)
Requirement already satisfied: oauthlib>=3.0.0 in d:\python-opencv\venv\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.6->tensorFlow) (3.1.1)
看样子安装成功了