Exception: Versioning forthis project requires either an sdist tarball, 문제 해결 방법

2003 단어 기계 학습
[root@localhost ~]# python
Python 2.7.5 (default, Aug  4 2017, 00:39:18) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in 
    from tensorflow.python import *
  File "/usr/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 114, in 
    from tensorflow.python.platform import test
  File "/usr/lib/python2.7/site-packages/tensorflow/python/platform/test.py", line 60, in 
    import mock                # pylint: disable=g-import-not-at-top,unused-import
  File "/usr/lib/python2.7/site-packages/mock/__init__.py", line 2, in 
    import mock.mock as _mock
  File "/usr/lib/python2.7/site-packages/mock/mock.py", line 71, in 
    _v = VersionInfo('mock').semantic_version()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 461, in semantic_version
    self._semantic = self._get_version_from_pkg_resources()
  File "/usr/lib/python2.7/site-packages/pbr/version.py", line 448, in _get_version_from_pkg_resources
    result_string = packaging.get_version(self.package)
  File "/usr/lib/python2.7/site-packages/pbr/packaging.py", line 755, in get_version
    name=package_name))
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also pup.cfg and the argument given to pbr.version.VersionInfo. Project name mock was given, but was not able to be found.

해결 방법:
sudo pip install --upgrade distribute
문제가 있으면 다음 방법을 사용하세요.
pip install --upgrade tensorflow_gpu

좋은 웹페이지 즐겨찾기