Pyinstaller 安装报错,有大佬帮忙看看吗? - V2EX
推荐学习书目
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
nanhuier

Pyinstaller 安装报错,有大佬帮忙看看吗?

  •  
  •   nanhuier Sep 18, 2019 6143 views
    This topic created in 2428 days ago, the information mentioned may be changed or developed.
    用的是 py2.7,pip 版本 19.2.3, 使用命令
    pip install pyinstaller
    报错如下:

    Collecting pyinstaller
    Using cached https://files.pythonhosted.org/packages/e2/c9/0b44b2ea87ba36395483a672fddd07e6a9cb2b8d3c4a28d7ae76c7e7e1e5/PyInstaller-3.5.tar.gz
    Installing build dependencies ... error
    ERROR: Command errored out with exit status 1:
    command: 'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\3540004\appdata\local\temp\pip-build-env-gshins\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
    cwd: None
    Complete output (12 lines):
    Traceback (most recent call last):
    File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
    File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
    File "c:\python27\lib\site-packages\pip\__main__.py", line 16, in <module>
    from pip._internal import main as _main # isort:skip # noqa
    File "c:\python27\lib\site-packages\pip\_internal\__init__.py", line 19, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
    File "c:\python27\lib\site-packages\pip\_vendor\urllib3\__init__.py", line 25, in <module>
    from logging import NullHandler
    ImportError: cannot import name NullHandler
    ----------------------------------------
    ERROR: Command errored out with exit status 1: 'c:\python27\python.exe' 'c:\python27\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'c:\users\3540004\appdata\local\temp\pip-build-env-gshins\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.

    请问有大佬碰到过吗
    3 replies    2019-09-18 09:42:25 +08:00
    arrow8899
        1
    arrow8899  
       Sep 18, 2019
    https://www.google.com/search?q=cannot+import+name+NullHandler
    善用搜索引擎,第一条就是答案
    delectate
        2
    delectate  
       Sep 18, 2019
    The NullHandler is only available on Python version 2.7+. You could create the NullHandler yourself on an ImportError:

    import logging

    try:
    from logging import NullHandler
    except ImportError:
    class NullHandler(logging.Handler):
    def emit(self, record):
    pass

    logging.getLogger(__name__).addHandler(NullHandler())


    https://stackoverflow.com/questions/26939308/importerror-cannot-import-name-nullhandler
    cwjokaka
        3
    cwjokaka  
       Sep 18, 2019
    遇到 pip 相关的问题,如果解决不了,我都会重建一个 venv
    About     Help     Advertise     Blog     API     FAQ     Solana     3360 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 62ms UTC 13:45 PVG 21:45 LAX 06:45 JFK 09:45
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86