I am having this error during installing dlib and face-recognition. (cmake is done)
Collecting dlib==19.18.0
Using cached dlib-19.18.0.tar.gz (3.1 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py): started
Building wheel for dlib (setup.py): finished with status ‘error’
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib: started
Running setup.py install for dlib: finished with status ‘error’
ERROR: Command errored out with exit status 1:
command: ‘C:UsersHaiderAppDataLocalMicrosoftWindowsAppsPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0python.exe’ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py'”‘”‘; file='”‘”‘C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py'”‘”‘;f = getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(file) if os.path.exists(file) else io.StringIO(‘”‘”‘from setuptools import setup; setup()'”‘”‘);code = f.read().replace(‘”‘”‘rn'”‘”‘, ‘”‘”‘n'”‘”‘);f.close();exec(compile(code, file, ‘”‘”‘exec'”‘”‘))’ bdist_wheel -d ‘C:UsersHaiderAppDataLocalTemppip-wheel-usp4krfi’
cwd: C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9
Complete output (55 lines):
running bdist_wheel
running build
running build_py
package init file ‘dlib_init_.py’ not found (or not a regular file)
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
Traceback (most recent call last):
File “C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py”, line 120, in get_cmake_version
out = subprocess.check_output([‘cmake’, ‘–version’])
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libsubprocess.py”, line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libsubprocess.py”, line 505, in run
with Popen(*popenargs, **kwargs) as process:
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libsubprocess.py”, line 951, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libsubprocess.py”, line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “”, line 1, in
File “C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py”, line 223, in
setup(
File “C:UsersHaiderAppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39site-packagessetuptools_init_.py”, line 153, in setup
return distutils.core.setup(attrs)
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilscore.py”, line 148, in setup
dist.run_commands()
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilsdist.py”, line 966, in run_commands
self.run_command(cmd)
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilsdist.py”, line 985, in run_command
cmd_obj.run()
File “C:UsersHaiderAppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39site-packageswheelbdist_wheel.py”, line 299, in run
self.run_command(‘build’)
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilscmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilsdist.py”, line 985, in run_command
cmd_obj.run()
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilscommandbuild.py”, line 135, in run
self.run_command(cmd_name)
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilscmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilsdist.py”, line 985, in run_command
cmd_obj.run()
File “C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py”, line 129, in run
cmake_version = self.get_cmake_version()
File “C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py”, line 122, in get_cmake_version
raise RuntimeError(“n*****************************************************************n” +
RuntimeError:
CMake must be installed to build the following extensions: dlib
ERROR: Failed building wheel for dlib
ERROR: Command errored out with exit status 1:
command: ‘C:UsersHaiderAppDataLocalMicrosoftWindowsAppsPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0python.exe’ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py'”‘”‘; file='”‘”‘C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py'”‘”‘;f = getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(file) if os.path.exists(file) else io.StringIO(‘”‘”‘from setuptools import setup; setup()'”‘”‘);code = f.read().replace(‘”‘”‘rn'”‘”‘, ‘”‘”‘n'”‘”‘);f.close();exec(compile(code, file, ‘”‘”‘exec'”‘”‘))’ install –record ‘C:UsersHaiderAppDataLocalTemppip-record-lyp_jhyeinstall-record.txt’ –single-version-externally-managed –user –prefix= –compile –install-headers ‘C:UsersHaiderAppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39Includedlib’
cwd: C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9
Complete output (57 lines):
running install
running build
running build_py
package init file ‘dlib_init_.py’ not found (or not a regular file)
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
Traceback (most recent call last):
File "C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py", line 120, in get_cmake_version
out = subprocess.check_output(['cmake', '--version'])
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libsubprocess.py", line 424, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libsubprocess.py", line 505, in run
with Popen(*popenargs, **kwargs) as process:
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libsubprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libsubprocess.py", line 1420, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py", line 223, in <module>
setup(
File "C:UsersHaiderAppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39site-packagessetuptools__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilscore.py", line 148, in setup
dist.run_commands()
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilsdist.py", line 966, in run_commands
self.run_command(cmd)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersHaiderAppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39site-packagessetuptoolscommandinstall.py", line 61, in run
return orig.install.run(self)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilscommandinstall.py", line 546, in run
self.run_command('build')
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilscommandbuild.py", line 135, in run
self.run_command(cmd_name)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilscmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:Program FilesWindowsAppsPythonSoftwareFoundation.Python.3.9_3.9.1520.0_x64__qbz5n2kfra8p0libdistutilsdist.py", line 985, in run_command
cmd_obj.run()
File "C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py", line 129, in run
cmake_version = self.get_cmake_version()
File "C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py", line 122, in get_cmake_version
raise RuntimeError("n*******************************************************************n" +
RuntimeError:
*******************************************************************
CMake must be installed to build the following extensions: dlib
*******************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: ‘C:UsersHaiderAppDataLocalMicrosoftWindowsAppsPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0python.exe’ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py'”‘”‘; file='”‘”‘C:UsersHaiderAppDataLocalTemppip-install-57j0zzf2dlib_c4a81041578145ff85c50fb1f74112f9setup.py'”‘”‘;f = getattr(tokenize, ‘”‘”‘open'”‘”‘, open)(file) if os.path.exists(file) else io.StringIO(‘”‘”‘from setuptools import setup; setup()'”‘”‘);code = f.read().replace(‘”‘”‘rn'”‘”‘, ‘”‘”‘n'”‘”‘);f.close();exec(compile(code, file, ‘”‘”‘exec'”‘”‘))’ install –record ‘C:UsersHaiderAppDataLocalTemppip-record-lyp_jhyeinstall-record.txt’ –single-version-externally-managed –user –prefix= –compile –install-headers ‘C:UsersHaiderAppDataLocalPackagesPythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0LocalCachelocal-packagesPython39Includedlib’ Check the logs for full command output.
E:programingPython>pip install pyinstaller
Collecting pyinstaller
Using cached PyInstaller-3.6.tar.gz (3.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: 'c:usersникитаappdatalocalprogramspythonpython38-32python.
exe' 'c:usersникитаappdatalocalprogramspythonpython38-32libsite-package
spip_vendorpep517_in_process.py' prepare_metadata_for_build_wheel 'C:Users
843E~1AppDataLocalTemptmptitfmjcz'
cwd: C:UsersНикитаAppDataLocalTemppip-install-vqw4tu5epyinstalle
r
Complete output (36 lines):
running dist_info
creating C:UsersНикитаAppDataLocalTemppip-modern-metadata-jlh43b56PyI
nstaller.egg-info
writing C:UsersНикитаAppDataLocalTemppip-modern-metadata-jlh43b56PyIn
staller.egg-infoPKG-INFO
writing dependency_links to C:UsersНикитаAppDataLocalTemppip-modern-me
tadata-jlh43b56PyInstaller.egg-infodependency_links.txt
writing entry points to C:UsersНикитаAppDataLocalTemppip-modern-metada
ta-jlh43b56PyInstaller.egg-infoentry_points.txt
writing requirements to C:UsersНикитаAppDataLocalTemppip-modern-metada
ta-jlh43b56PyInstaller.egg-inforequires.txt
writing top-level names to C:UsersНикитаAppDataLocalTemppip-modern-met
adata-jlh43b56PyInstaller.egg-infotop_level.txt
writing manifest file 'C:UsersНикитаAppDataLocalTemppip-modern-metadat
a-jlh43b56PyInstaller.egg-infoSOURCES.txt'
reading manifest file 'C:UsersНикитаAppDataLocalTemppip-modern-metadat
a-jlh43b56PyInstaller.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xed in positio
n 0: invalid continuation byte (sitecustomize.py, line 7)
no previously-included directories found matching 'bootloaderbuild'
no previously-included directories found matching 'bootloader.waf-*'
no previously-included directories found matching 'bootloader.waf3-*'
no previously-included directories found matching 'bootloaderwaf-*'
no previously-included directories found matching 'bootloaderwaf3-*'
no previously-included directories found matching 'bootloader_sdks'
no previously-included directories found matching 'bootloader.vagrant'
warning: no previously-included files found matching 'bootloader.lock-waf*'
no previously-included directories found matching 'docsource'
no previously-included directories found matching 'doc_build'
warning: no previously-included files matching '*.tmp' found under directory
'doc'
warning: no files found matching 'news_template.rst'
no previously-included directories found matching 'news'
no previously-included directories found matching 'old'
no previously-included directories found matching 'scripts'
no previously-included directories found matching 'testsscripts'
no previously-included directories found matching '.github'
warning: no previously-included files found matching '.*'
warning: no previously-included files found matching '*.yml'
warning: no previously-included files found matching '*~'
warning: no previously-included files found matching '.directory'
writing manifest file 'C:UsersНикитаAppDataLocalTemppip-modern-metadat
a-jlh43b56PyInstaller.egg-infoSOURCES.txt'
creating 'C:UsersНикитаAppDataLocalTemppip-modern-metadata-jlh43b56Py
Installer.dist-info'
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:usersникитаappdatalocalpr
ogramspythonpython38-32python.exe' 'c:usersникитаappdatalocalprogramspy
thonpython38-32libsite-packagespip_vendorpep517_in_process.py' prepare_me
tadata_for_build_wheel 'C:Users843E~1AppDataLocalTemptmptitfmjcz' Check th
e logs for full command output.
6
Попробуй обновить pip до последней версии: python -m pip install ––upgrade pip
И если python ниже версии 3.8, то его тоже нужно обновить там эту ошибку пофиксили, и после обновления проблем быть не должно
ответ дан 26 июн 2020 в 22:53
rednikrednik
1621 серебряный знак11 бронзовых знаков
Я только начал изучать python и понял, что нужно установить pyinstaller
ERROR: Command errored out with exit status 1:
command: 'c:usersприветappdatalocalprogramspythonpython39python.exe' 'c:usersприветappdatalocalprogramspythonpython39libsite-packagespip_vendorpep517_in_process.py' prepare_metadata_for_build_wheel 'C:Users935~1AppDataLocalTemptmpqv_ibr98'
cwd: C:UsersПриветAppDataLocalTemppip-install-_5ny64c6pyinstaller
Complete output (38 lines):
Error in sitecustomize; set PYTHONVERBOSE for traceback:
SyntaxError: (unicode error) 'utf-8' codec can't decode byte 0xef in position 0: invalid continuation byte (sitecustomize.py, line 7)
running dist_info
creating C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.egg-info
writing C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.egg-infoPKG-INFO
writing dependency_links to C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.egg-infodependency_links.txt
writing entry points to C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.egg-infoentry_points.txt
writing requirements to C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.egg-inforequires.txt
writing top-level names to C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.egg-infotop_level.txt
writing manifest file 'C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.egg-infoSOURCES.txt'
reading manifest file 'C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.egg-infoSOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'pyinstaller-gui.py'
no previously-included directories found matching 'bootloaderbuild'
no previously-included directories found matching 'bootloader.waf-*'
no previously-included directories found matching 'bootloader.waf3-*'
no previously-included directories found matching 'bootloaderwaf-*'
no previously-included directories found matching 'bootloaderwaf3-*'
no previously-included directories found matching 'bootloader_sdks'
no previously-included directories found matching 'bootloader.vagrant'
warning: no previously-included files found matching 'bootloader.lock-waf*'
no previously-included directories found matching 'docsource'
no previously-included directories found matching 'doc_build'
warning: no previously-included files matching '*.tmp' found under directory 'doc'
warning: no files found matching 'news_template.rst'
no previously-included directories found matching 'news'
no previously-included directories found matching 'old'
no previously-included directories found matching 'scripts'
no previously-included directories found matching 'testsscripts'
no previously-included directories found matching '.github'
warning: no previously-included files found matching '.*'
warning: no previously-included files found matching '*.yml'
warning: no previously-included files found matching '*~'
warning: no previously-included files found matching '.directory'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
writing manifest file 'C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.egg-infoSOURCES.txt'
creating 'C:UsersПриветAppDataLocalTemppip-modern-metadata-zuqayryzpyinstaller.dist-info'
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:usersприветappdatalocalprogramspythonpython39python.exe' 'c:usersприветappdatalocalprogramspythonpython39libsite-packagespip_vendorpep517_in_process.py' prepare_metadata_for_build_wheel 'C:Users935~1AppDataLocalTemptmpqv_ibr98' Check the logs for full command output.
In this Python tutorial, we will see how to fix the error, Command errored out with exit status 1 in Python.
The error was coming when I was trying to install the Python strings module by running the below command:
pip install strings
The complete error was coming like below:
ERROR: Command errored out with exit status 1:
command: ‘c:pythonpython38python.exe’ -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘”‘”‘C:UsersAdministrator.SHAREPOINTSKYAppDataLocalTemppip-install-e261r6jistringssetup.py’”‘”‘; file=’”‘”‘C:UsersAdministrator.SHAREPOINTSKYAppDataLocalTemppip-install-e261r6jistringssetup.py’”‘”‘;f=getattr(tokenize, ‘”‘”‘open’”‘”‘, open)(file);code=f.read().replace(‘”‘”‘rn’”‘”‘, ‘”‘”‘n’”‘”‘);f.close();exec(compile(code, file, ‘”‘”‘exec’”‘”‘))’ egg_info –egg-base ‘C:UsersAdministrator.SHAREPOINTSKYAppDataLocalTemppip-pip-egg-info-hu8mfm_g’
cwd: C:UsersAdministrator.SHAREPOINTSKYAppDataLocalTemppip-install-e261r6jistrings
Complete output (5 lines):
Traceback (most recent call last):
File “”, line 1, in
File “C:UsersAdministrator.SHAREPOINTSKYAppDataLocalTemppip-install-e261r6jistringssetup.py”, line 5, in
import strings
ModuleNotFoundError: No module named ‘strings’
—————————————-
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Below image shows the screenshot of error:
There was no issue with the command, one file with name string.py was causing the issue.
As you can see below there was filename string.py in the same folder which was causing the issue.
To fix the issue, we need to simply delete the string.py file from the folder.
Ideally, we should not create any file with name as string.py.
AttributeError: partially initialized module ‘random’ has no attribute ‘randint’
The above same file name (string.py) issue might give the below error also,
AttributeError: partially initialized module ‘random’ has no attribute ‘randint’ (most likely due to a circular import).
Follow the same delete the file solution to fix this issue also.
You may like the following python tutorials:
- Python epoch to DateTime + Examples
- Priority queue in Python
- Python 3 pickle typeerror a bytes-like object is required not ‘str’
- Python binary search and linear search
- Sorting algorithms in Python
- Working with JSON data in Python
- Python GUI Programming
- Increment and Decrement operators in Python
- Constructor in Python
- How to convert dictionary to JSON in Python
Here, we learned how to fix the below two errors in Python:
- Command errored out with exit status 1 python
- AttributeError: partially initialized module ‘random’ has no attribute ‘randint’
Python is one of the most popular languages in the United States of America. I have been working with Python for a long time and I have expertise in working with various libraries on Tkinter, Pandas, NumPy, Turtle, Django, Matplotlib, Tensorflow, Scipy, Scikit-Learn, etc… I have experience in working with various clients in countries like United States, Canada, United Kingdom, Australia, New Zealand, etc. Check out my profile.
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.
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.
Srinivas Ramakrishna is a Solution Architect and has 14+ Years of Experience in the Software Industry. He has published many articles on Medium, Hackernoon, dev.to and solved many problems in StackOverflow. He has core expertise in various technologies such as Microsoft .NET Core, Python, Node.JS, JavaScript, Cloud (Azure), RDBMS (MSSQL), React, Powershell, etc.
Sign Up for Our Newsletters
Subscribe to get notified of the latest articles. We will never spam you. Be a part of our ever-growing community.
By checking this box, you confirm that you have read and are agreeing to our terms of use regarding the storage of the data submitted through this form.