使用 pyinstaller 打包 pyqt4 代码, exe 文件能正常生成,不过执行 exe 文件的时候总是提示 'setuptools' distribution was not found ,
我 setuptools 是肯定装了的, pip show setuptools 也能看到相应信息,实在不知道什么地方有问题了。
PS :我在网上找了个俄罗斯方块的 qt4 文件,那个可以成功打包,也可以执行,就是我写的那个执行不了,跪求大神帮忙看看有什么问题啊。
错误信息:
···
D:\PyInstaller-3.1.1\cclient\dist\cclient>cclient.exe
Traceback (most recent call last):
File "<string>", line 6, in <module>
File "D:\PyInstaller-3.1.1\PyInstaller\loader\
pyimod03_importers.py", line 389
, in load_module
exec(bytecode, module.__dict__)
File "
login.py", line 6, in <module>
File "D:\PyInstaller-3.1.1\PyInstaller\loader\
pyimod03_importers.py", line 389
, in load_module
exec(bytecode, module.__dict__)
File "site-packages\keystoneclient\
__init__.py", line 36, in <module>
File "site-packages\pbr\
version.py", line 465, in version_string
File "site-packages\pbr\
version.py", line 460, in semantic_version
File "site-packages\pbr\
version.py", line 446, in _get_version_from_pkg_resour
ces
File "D:\PyInstaller-3.1.1\PyInstaller\loader\
pyimod03_importers.py", line 389
, in load_module
exec(bytecode, module.__dict__)
File "site-packages\pbr\
packaging.py", line 33, in <module>
File "D:\PyInstaller-3.1.1\PyInstaller\loader\
pyimod03_importers.py", line 389
, in load_module
exec(bytecode, module.__dict__)
File "build\bdist.win32\egg\setuptools\command\
develop.py", line 9, in <module
>
File "D:\PyInstaller-3.1.1\PyInstaller\loader\
pyimod03_importers.py", line 389
, in load_module
exec(bytecode, module.__dict__)
File "build\bdist.win32\egg\setuptools\command\
easy_install.py", line 48, in <
module>
File "D:\PyInstaller-3.1.1\PyInstaller\loader\
pyimod03_importers.py", line 389
, in load_module
exec(bytecode, module.__dict__)
File "build\bdist.win32\egg\setuptools\
package_index.py", line 203, in <module
>
File "build\bdist.win32\egg\pkg_resources\
__init__.py", line 962, in require
File "build\bdist.win32\egg\pkg_resources\
__init__.py", line 849, in resolve
pkg_resources.DistributionNotFound: The 'setuptools' distribution was not found
and is required by the application
main returned -1
···
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/277366
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.