推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
bspeng922
V2EX  ›  Python

pyinstaller 打包 pyqt4 老是有问题

  •  
  •   bspeng922 · May 9, 2016 · 4884 views
    This topic created in 3804 days ago, the information mentioned may be changed or developed.
    使用 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
    ···
    1 replies  •  2016-05-09 18:31:02 +08:00
    RqPS6rhmP3Nyn3Tm
        1
    RqPS6rhmP3Nyn3Tm  
       May 9, 2016 via iPad
    Pyqt5 正常,昨天刚打包。反而 py2app 死活打不了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1438 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 16:44 · PVG 00:44 · LAX 09:44 · JFK 12:44
    ♥ Do have faith in what you're doing.