相关文章推荐
踏实的墨镜  ·  QtScript ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output - while installing auto-py-to-exe through pip

Ask Question

I am trying to download auto-py-to-exe on a different (windows) device than I usually use through pip. However when run I get the error (sorry it is so very very long):

ERROR: Command errored out with exit status 1:
     command: 'c:\users\tom\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\tom\\AppData\\Local\\Temp\\pip-install-aplljhe0\\gevent\\setup.py'"'"'; __file__='"'"'C:\\Users\\tom\\AppData\\Local\\Temp\\pip-install-aplljhe0\\gevent\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\tom\AppData\Local\Temp\pip-install-aplljhe0\gevent\pip-egg-info'
         cwd: C:\Users\tom\AppData\Local\Temp\pip-install-aplljhe0\gevent\
    Complete output (113 lines):
    Traceback (most recent call last):
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
        return self.find_available_vc_vers()[-1]
    IndexError: list index out of range
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
        yield saved
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "C:\Users\tom\AppData\Local\Temp\easy_install-29et0so1\cffi-1.14.0\setup.py", line 127, in <module>
        HUB_PRIMITIVES = Extension(name="gevent.__hub_primitives",
      File "C:\Users\tom\AppData\Local\Temp\easy_install-29et0so1\cffi-1.14.0\setup.py", line 105, in uses_msvc
        include_dirs=include_dirs)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 225, in try_compile
        self._compile(body, headers, include_dirs, lang)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 132, in _compile
        self.compiler.compile([src], include_dirs=include_dirs)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 360, in compile
        self.initialize()
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
        return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 843, in __init__
        self.si = SystemInfo(self.ri, vc_ver)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 485, in __init__
        self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
        raise distutils.errors.DistutilsPlatformError(err)
    distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\tom\AppData\Local\Temp\pip-install-aplljhe0\gevent\setup.py", line 427, in <module>
        run_setup(EXT_MODULES, run_make=_BUILDING)
      File "C:\Users\tom\AppData\Local\Temp\pip-install-aplljhe0\gevent\setup.py", line 328, in run_setup
        setup(
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
        dist = best[req.key] = env.best_match(
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
        return installer(requirement)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
        return cmd.easy_install(req)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
        run_setup(setup_script, args)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
        raise
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
        yield saved
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
        yield
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "C:\Users\tom\AppData\Local\Temp\easy_install-29et0so1\cffi-1.14.0\setup.py", line 127, in <module>
        HUB_PRIMITIVES = Extension(name="gevent.__hub_primitives",
      File "C:\Users\tom\AppData\Local\Temp\easy_install-29et0so1\cffi-1.14.0\setup.py", line 105, in uses_msvc
        include_dirs=include_dirs)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 225, in try_compile
        self._compile(body, headers, include_dirs, lang)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 132, in _compile
        self.compiler.compile([src], include_dirs=include_dirs)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 360, in compile
        self.initialize()
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
        return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 843, in __init__
        self.si = SystemInfo(self.ri, vc_ver)
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 485, in __init__
        self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
      File "c:\users\tom\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
        raise distutils.errors.DistutilsPlatformError(err)
    distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Even though it does state that I need Visual Studio C++ 14.0 my computer won't install it and I have not needed it before. I checked This Stack Overflow Question but it relates to another pip install and has no answers. If the only answer is to install Visual Studio then I am kinda screwed.

Ok I look back at this question 9 months later and it has 18 upvotes with around 80k views! That's big :) – Thomas Jan 21, 2021 at 9:41

Since this answer was posted, gevent has released several new versions, including prebuilt wheels for Python 3.8 on Windows, so the pip install gevent --pre shouldn't be necessary anymore - just run pip install auto-py-to-exe as usual and it should work.

Original answer

Allow prerelease gevent versions via

$ pip install gevent --pre
$ pip install auto-py-to-exe

Explanation: auto-py-to-exe is installable on Python 3.8 on Windows without any issues (this can be verified e.g. by running pip install auto-py-to-exe --no-deps). However, it requires bottle-websocket to be installed, which in turn has gevent dependency. gevent did not release a stable version that offers prebuilt wheels for Python 3.8 yet (this would be 1.5), so pip doesn't pick up prebuilt wheels and tries to build gevent==1.4 from source dist. Installing the prerelease 1.5 version of gevent avoids this.

Wow this works so well - thanks. almost makes me wonder if I needed to put bounty on it at all... – Thomas Apr 10, 2020 at 16:38 Glad I could help! I don't know whether you can cancel a running bounty, but if you do, I don't mind. – hoefling Apr 10, 2020 at 17:17 The second pip install returned the same error for me (Check the logs for full command output.) – dekio Dec 17, 2020 at 13:09 @dekio since I have written my answer, gevent has released prebuilt wheels for Python 3.8, so the pip install gevent --pre command shouldn't be necessary anymore. If you have another setup (e.g. Python 3.9 instead of 3.8 etc or have installed the 32bit version of Python instead of 64bit), please open a new question describing your issue. – hoefling Dec 17, 2020 at 13:22
  • IndexError: list index out of range.
  • distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required
  • For the first error, You can try this code

    pip install --no-use-wheel --upgrade distribute
    

    if --no-use-wheel part didn't work, use --no-binary :all: instead.

    Source

    For the second error, you can use

    pip install --upgrade setuptools
    

    Source

    If the above methods didn't work

  • If your build tools further not answering to your problem, try to install build tools manually through this link.

  • After that you have to restart your PC or laptop.

  • Then try to run your code again

    When I run pip install --no-use-wheel --upgrade distribute I get no such option: --no-use-wheel C:\WINDOWS\system32>Source 'Source' is not recognized as an internal or external command, operable program or batch file. – Thomas Apr 7, 2020 at 15:41 try to use pip3 instead of pip. And also refer both source links. There are lot of suggestions in there – Kalana Apr 7, 2020 at 18:28 C:\WINDOWS\system32>pip3 install --no-use-wheel --upgrade distribute Usage: pip3 install [options] <requirement specifier> [package-index-options] ... pip3 install [options] -r <requirements file> [package-index-options] ... pip3 install [options] [-e] <vcs project url> ... pip3 install [options] [-e] <local project path> ... pip3 install [options] <archive url/path> ... no such option: --no-use-wheel – Thomas Apr 8, 2020 at 12:49 What does this command really do? Mine has run for now 30 minutes downloading files i have no idea of...it gets really annoying given i have no idea what it actually does ....pouring this and that then back to downloading – herbert ichama Jul 9, 2021 at 19:24

    I got this error while installing mysqlclient. Here is the solution in simple steps:

    Step 0: sudo apt install python3-dev build-essential

    Step 1: sudo apt install libssl1.1

    Step 2: sudo apt install libssl1.1=1.1.1f-1ubuntu2

    Step 3: sudo apt install libssl-dev

    Step 4: sudo apt install libmysqlclient-dev

    Step 5: pip3 install mysqlclient

    That's it!

    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. How to fix the error? See more linked questions
  •