使用 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
···