运行由PyInstaller(python 2.7)创建的可执行文件时出错,

时间:2018-08-30 10:22:36

标签: python tensorflow pyinstaller

很抱歉提出愚蠢的问题。 我已经使用Pyintaller(与Ubuntu 16.04和pyinstaller 3.3.1)打包了python源代码。它可以在我自己的计算机上完美运行,但是会出现不同的错误。我遇到的典型错误是

例外:此项目的版本控制需要sdist tarball或对上游git存储库的访问。 setup.cfg中的软件包名称与提供给pbr.version.VersionInfo的参数之间也可能不匹配。已给出项目名称嘲笑,但找不到。[1996]无法执行脚本预测”。

详细的错误消息如下所示。请帮我解决这个问题,我现在不知道如何解决。非常感谢!

/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py:687: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
Using TensorFlow backend.
Traceback (most recent call last):
  File "predict.py", line 2, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "data_pre.py", line 3, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "csvdata_pre.py", line 1, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/keras/__init__.py", line 3, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/keras/utils/__init__.py", line 6, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/keras/utils/conv_utils.py", line 9, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/keras/backend/__init__.py", line 84, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/keras/backend/tensorflow_backend.py", line 5, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/tensorflow/__init__.py", line 24, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/tensorflow/python/__init__.py", line 115, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/tensorflow/python/platform/test.py", line 61, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/mock/__init__.py", line 2, in <module>
  File "/tmp/pip-install-47BC1A/pyinstaller/PyInstaller/loader/pyimod03_importers.py", line 396, in load_module
  File "site-packages/mock/mock.py", line 71, in <module>
  File "site-packages/pbr/version.py", line 462, in semantic_version
  File "site-packages/pbr/version.py", line 449, in _get_version_from_pkg_resources
  File "site-packages/pbr/packaging.py", line 812, in get_version
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. It's also possible that there is a mismatch between the package name in setup.cfg and the argument given to pbr.version.VersionInfo. Project name mock was given, but was not able to be found.
[49902] Failed to execute script predict

here is the error message

0 个答案:

没有答案