[Python] What to do if an error occurs in pip (pyinstaller, pyautogui, etc.)

Overview

When I created a virtual environment after a long time and tried to install pyinstaller with the pip command, an error occurred. Probably the same cause as the error that occurred in pyautogui in the past. ↑ [Python] pyautogui (PyMsgBox) Provisional measures against installation errors ** I solved it after installing "wheel" **, so make a note.

error contents

When installing pyinstaller with pip, the installation fails with the following error content.

(pyautogui_pillow) PS C:\Users\aaa\Desktop\python\10_Right click tool> pip install pyinstaller        
Collecting pyinstaller
  Using cached pyinstaller-4.1.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:

          :

    creating 'C:\Users\aaa\AppData\Local\Temp\pip-modern-metadata-f8yl8_co\pyinstaller.dist-info'
    error: invalid command 'bdist_wheel'
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\aaa\desktop\python\pyautogui_pillow\scripts\python.exe' 'c:\users\aaa\desktop\python\pyautogui_pillow\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\aaa\AppData\Local\Temp\tmpo72l8jp6' Check the logs for full command output.

It is written that the wheel deployment failed in the third line from the bottom, so this area is suspicious.

Coping

Just install wheel with pip.

> pip install wheel

After that, you can reinstall the library with the error again with pip. For the time being, "py installer" and "py autogui" that had an error could be installed by this method.

Consideration

wheel is one of the python packaging formats. It seems that eggs used to be the mainstream packaging format, but nowadays wheels are mostly used. In this case, it is expected that the packaging format of the latest version of the library has changed and it is no longer possible to deploy the wheel in the existing environment. (I haven't updated the python environment, so there may be a root cause in that.)

By the way, it seems that many pip errors are caused by proxies or PC administrator privileges. If you are using it in an in-house LAN environment, please doubt that as well.

environment

Recommended Posts

[Python] What to do if an error occurs in pip (pyinstaller, pyautogui, etc.)
[OSX] [pyenv] What to do when an SSL error occurs in pip
What to do if a UnicodeDecodeError occurs in pip
[python] What to do when an error occurs in send_keys of headless chrome
What to do if a Unicode Encode Error occurs in Sublime Text Python
What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do if PyInstaller3.5 gives an error in Python3.8 (TypeError: an integer is required (got type bytes))
What to do if the print command itself causes an error in Maya python
What to do if you get an error when importing matplotlib in Python (Mac)
What to do if you run python in IntelliJ and end with an error
What to do if an error occurs when importing numpy with VScode
What to do if pip --user returns an error in a virtual environment created with pyenv
What to do if pip install fails in Xcode 5.1
What to do when SSL error occurs in pip in Windows10, miniconda, VScode environment
What to do if you get an error when installing python with pyenv
What to do if a version error occurs in the selenium Chrome driver
What to do if an SSL connection error (ssl.SSLError: [SSL: DH_KEY_TOO_SMALL]) occurs on Ubuntu 20.04
What to do if a symbolic link error occurs in import cv while trying to install OpenCV in Python
What to do if an error occurs in TensorFlow RNN related import or RNN (LSTM) Cell (v 0.11r ~)
What to do if ʻarguments [0] .scrollIntoView ();` fails in python selenium
What to do if pip gives a DistributionError in Homebrew
What to do when an error occurs with import _ssl
[Python] Type Error:'WebElement' object is not iterable What to do when an error occurs
What to do if you get an OpenSSL error when installing Python 2 with pyenv
What to do if an error occurs when loading a python project created with poetry into VS Code
What to do if you can't install pyaudio with pip #Python
What to do if you get a minus zero in Python
[Beanstalk] What to do when an error occurs with import uuid
What to do if you get Swagger-codegen in python and Import Error: No module named
What to do when ModuleNotFoundError: No module named'XXX' occurs in Python
What to do if you get an error when running "certbot renew" in CakePHP environment
What to do if you get an Undefined error when trying to use pip with pyenv
What to do if Fatal Python error: Py_Initialize: can't initialize sys standard streams LookupError: unknown encoding: windows-31j occurs in PyCharm
What to do if you get an error saying c compiler cannot create executables in configure
What to do if there is a decimal in python json .dumps
What to do if you couldn't send an email to Yahoo with Python.
What to do if you can't use scikit grid search in Python
What to do if pyenv install does not proceed with an error
What to do if No Python documentation found for ... appears in pydoc
[Python] What to do when an error related to SSL authentication is returned
What to do if you get an error when trying to load mnist
What to do if you can't install with pip in babun environment
What to do if you get an error when installing Dlib (Ubuntu)
What to do if pipreqs results in UnicodeDecodeError
Note: What to do if pip install fails
What to do if pip cannot be installed
What to do to get google spreadsheet in python
What to do if you get an error like'Qstring' has already been set to version 1 using mne python
What to do if you get angry with "Value Error: unknown local: UTF-8" in python manage.py syncdb
[Django] What to do if an Integrity Error occurs when registering data from the management site to the database
What to do if you get a "No versions found" error in pipenv
[Python] I want to know the variables in the function when an error occurs!
What to do if you get "Python not configured." Using PyDev in Eclipse
What to do if you can't pip install mysqlclient
What to do if pip install fails to install dependent libraries
What to do if you get an error when trying to send a message in tasks.loop () immediately after startup
What to do if you get an "unknown service" error from your gRPC server
What to do if you get `No kernel for language python found` in Hydrogen
What to do if you get "(35,'SSL connect error')" in pycurl (one of them)
What to do if the progress bar is not displayed in tqdm of python
What to do if Python IntelliSense is not displayed in VS Code on Windows