Home > command "python setup.py egg_info" failed with error code 1 in /private/var/folders

How to fix command "python setup.py egg_info" failed with error code 1 in /private/var/folders?

Alton Alexander
By Alton AlexanderUpdated on June 4th, 2022

The "python setup.py egg_info" command failed with error code 1 in /private/var/folders because the path to the Python egg cache is incorrect. The error is caused by a misconfiguration in the PYTHONPATH environment variable.

Still not working? maybe try:

  1. Make sure you have setuptools installed. If not, install it using pip:
  2. pip install setuptools
  3. Retry the command. It may succeed the second time around.
  4. If the error persists, try uninstalling and then reinstalling the package you're trying to install:
  5. pip uninstall package-name
  6. pip install package-name
  7. Make sure you're in the correct directory. The setup.py file must be in the same directory as your project's init.py file.
  8. If you're still having trouble, check to see if there's a newer version of the package you're trying to install. Upgrade using pip:
  9. pip install --upgrade package-name