Exception: Versioning for this project requires either an sdist tarball,问题解决方法
来源:互联网 发布:如何新建数据库表 编辑:程序博客网 时间:2024/06/05 15:50
[root@localhost ~]# pythonPython 2.7.5 (default, Aug 4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import tensorflow as tfTraceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module> from tensorflow.python import * File "/usr/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 114, in <module> from tensorflow.python.platform import test File "/usr/lib/python2.7/site-packages/tensorflow/python/platform/test.py", line 60, in <module> import mock # pylint: disable=g-import-not-at-top,unused-import File "/usr/lib/python2.7/site-packages/mock/__init__.py", line 2, in <module> import mock.mock as _mock File "/usr/lib/python2.7/site-packages/mock/mock.py", line 71, in <module> _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
阅读全文