张量流安装过程中的错误

时间:2020-02-29 11:53:12

标签: tensorflow command-prompt

我无法更新(升级)我的tensorflow-gpu,并显示各种错误。即使在尝试搜索每个错误后,一个或另一个也会发生冲突,导致以红色字体引发错误。 您可以通过让该线程与我应该传递的命令一起回复来帮助我安装(升级)tensorflow-gpu错误吗? 这是我看到的错误列表

Collecting tensorflow-gpu
  Using cached tensorflow_gpu-2.1.0-cp37-cp37m-win_amd64.whl (356.5 MB)
Collecting scipy==1.4.1; python_version >= "3"
  Using cached scipy-1.4.1-cp37-cp37m-win_amd64.whl (30.9 MB)
Collecting keras-applications>=1.0.8
  Using cached Keras_Applications-1.0.8-py3-none-any.whl (50 kB)
Collecting google-pasta>=0.1.6
  Using cached google_pasta-0.1.8-py3-none-any.whl (57 kB)
Collecting numpy<2.0,>=1.16.0
  Using cached numpy-1.18.1-cp37-cp37m-win_amd64.whl (12.8 MB)
Processing c:\users\shash\appdata\local\pip\cache\wheels\2c\b1\94\43d03e130b929aae7ba3f8d15cbd7bc0d1cb5bb38a5c721833\opt_einsum-3.1.0-cp37-none-any.whl
Processing c:\users\shash\appdata\local\pip\cache\wheels\7c\06\54\bc84598ba1daf8f970247f550b175aaaee85f68b4b0c5ab2c6\termcolor-1.1.0-cp37-none-any.whl
Collecting wheel>=0.26; python_version >= "3"
  Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Collecting astor>=0.6.0
  Using cached astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting wrapt>=1.11.1
  Downloading wrapt-1.12.0.tar.gz (27 kB)
Collecting tensorboard<2.2.0,>=2.1.0
  Using cached tensorboard-2.1.0-py3-none-any.whl (3.8 MB)
Collecting grpcio>=1.8.6
  Using cached grpcio-1.27.2-cp37-cp37m-win_amd64.whl (1.9 MB)
Collecting keras-preprocessing>=1.1.0
  Using cached Keras_Preprocessing-1.1.0-py2.py3-none-any.whl (41 kB)
Processing c:\users\shash\appdata\local\pip\cache\wheels\8e\28\49\fad4e7f0b9a1227708cbbee4487ac8558a7334849cb81c813d\absl_py-0.9.0-cp37-none-any.whl
Collecting protobuf>=3.8.0
  Using cached protobuf-3.11.3-cp37-cp37m-win_amd64.whl (1.0 MB)
Collecting tensorflow-gpu-estimator<2.2.0,>=2.1.0rc0
  Using cached tensorflow_gpu_estimator-2.1.0-py2.py3-none-any.whl (464 kB)
Collecting six>=1.12.0
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Processing c:\users\shash\appdata\local\pip\cache\wheels\5c\2e\7e\a1d4d4fcebe6c381f378ce7743a3ced3699feb89bcfbdadadd\gast-0.2.2-cp37-none-any.whl
Collecting h5py
  Using cached h5py-2.10.0-cp37-cp37m-win_amd64.whl (2.5 MB)
Collecting google-auth<2,>=1.6.3
  Using cached google_auth-1.11.2-py2.py3-none-any.whl (76 kB)
Collecting requests<3,>=2.21.0
  Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 443 kB/s
Collecting markdown>=2.6.8
  Using cached Markdown-3.2.1-py2.py3-none-any.whl (88 kB)
Collecting setuptools>=41.0.0
  Using cached setuptools-45.2.0-py3-none-any.whl (584 kB)
Collecting werkzeug>=0.11.15
  Using cached Werkzeug-1.0.0-py2.py3-none-any.whl (298 kB)
Collecting google-auth-oauthlib<0.5,>=0.4.1
  Using cached google_auth_oauthlib-0.4.1-py2.py3-none-any.whl (18 kB)
Collecting cachetools<5.0,>=2.0.0
  Using cached cachetools-4.0.0-py3-none-any.whl (10 kB)
Collecting pyasn1-modules>=0.2.1
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting rsa<4.1,>=3.1.4
  Using cached rsa-4.0-py2.py3-none-any.whl (38 kB)
Collecting chardet<4,>=3.0.2
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2019.11.28-py2.py3-none-any.whl (156 kB)
Collecting idna<3,>=2.5
  Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 363 kB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Using cached urllib3-1.25.8-py2.py3-none-any.whl (125 kB)
Collecting requests-oauthlib>=0.7.0
  Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Collecting pyasn1<0.5.0,>=0.4.6
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting oauthlib>=3.0.0
  Using cached oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Building wheels for collected packages: wrapt
  Building wheel for wrapt (setup.py) ... done
  Created wheel for wrapt: filename=wrapt-1.12.0-py3-none-any.whl size=19565 sha256=8fcffad77f7712e3dcab457e1b9f25ef120f4fd4e925ce3049c8b256f9ec31fa
  Stored in directory: c:\users\shash\appdata\local\pip\cache\wheels\e5\78\69\f40ab7cae531c8f07003a9d1b4b81ebec14cda95519c57e7dd
Successfully built wrapt
ERROR: Error checking for conflicts.
Traceback (most recent call last):
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3021, in _dep_map
    return self.__dep_map
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3012, in _parsed_pkg_info
    return self._pkg_info
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 517, in _warn_about_conflicts
    package_set, _dep_info = check_install_conflicts(to_install)
  File "d:\anaconda3\lib\site-packages\pip\_internal\operations\check.py", line 114, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "d:\anaconda3\lib\site-packages\pip\_internal\operations\check.py", line 53, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2736, in requires
    dm = self._dep_map
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3023, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3032, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 3014, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1420, in get_metadata
    value = self._get(path)
  File "d:\anaconda3\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1616, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: 'd:\\anaconda3\\lib\\site-packages\\pyparsing-2.4.2.dist-info\\METADATA'
Installing collected packages: numpy, scipy, six, h5py, keras-applications, google-pasta, opt-einsum, termcolor, wheel, astor, wrapt, cachetools, pyasn1, pyasn1-modules, setuptools, rsa, google-auth, chardet, certifi, idna, urllib3, requests, absl-py, markdown, protobuf, grpcio, werkzeug, oauthlib, requests-oauthlib, google-auth-oauthlib, tensorboard, keras-preprocessing, tensorflow-gpu-estimator, gast, tensorflow-gpu
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'd:\\anaconda3\\Lib\\site-packages\\numpy\\random\\tests\\data\\mt19937-testset-1.csv'
Consider using the `--user` option or check the permissions.```


Also I see an error on trying to import tensorflow within a shell command.
The error is as follows:

```C:\Users\shash>python
Python 3.7.3 (default, Apr 24 2019, 15:29:51) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32

Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated.  Libraries may fail to load.  To activate this environment
please see https://conda.io/activation

Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
D:\Anaconda3\lib\site-packages\numpy\_distributor_init.py:32: UserWarning: loaded more than 1 DLL from .libs:
D:\Anaconda3\lib\site-packages\numpy\.libs\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll
D:\Anaconda3\lib\site-packages\numpy\.libs\libopenblas.TXA6YQSD3GCQQC22GEQ54J2UDCXDXHWN.gfortran-win_amd64.dll
  stacklevel=1)
2020-02-29 17:24:19.169004: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-02-29 17:24:19.175109: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
>>> ```

Thanks in advance.

1 个答案:

答案 0 :(得分:-1)

尝试使用此:

pip install --user some_pkg