If you are installing auto-py-to-exe package on Python 3.8 or below, you will get an error stating ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
In this tutorial, we will look into what exactly is ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output and how to fix it.
Error: command errored out with exit status 1
The auto-py-to-exe
library is mainly used to convert the python file(.py) into an executable file (.exe) and run it on windows.
As shown below, we can install the package directly through the pip command in Python 3.8.
$ pip install auto-py-to-exe
The package has an additional dependency on bottle-websocket, which in turn has a dependency on the gevent.
gevent did not release a stable version that offers prebuilt wheels for Python 3.8 during the time of release. Hence, the pip will pick the prebuilt wheels and try to build the gevent==1.4 version from the source dist, resulting in the below error.
ERROR: Command errored out with exit status 1:
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.
Later they had released the new version, which works without any issue. Let us look at the fix for this issue.
Solution
Currently, there are many versions of gevent released, including prebuilt wheels for Python 3.8 on Windows. You can just execute the below command to install the auto-py-to-exe package.
pip install auto-py-to-exe
If this is not working for you, you can try an alternate solution listed below.
pip3 install --upgrade pip setuptools wheel
If you are not able to install setuptools through pip you can also download Microsoft Visual C++ Build Tools and install it manually.
OR
pip install --no-use-wheel --upgrade distribute
pip install --upgrade setuptools
Once you perform this operation, you can install the auto-py-to-exe package. The same solution applies to other libraries, too, which have a dependency on gevent.