The error code 1 is defined as Operation not permitted in python standard errno system symbols. This issue is mostly caused when your setuptools do not appear to be installed or updated. In this article, we have provided the methods that solved the issue for most users regarding this particular error.
Check if your pip and setuptools are Installed Correctly
Before updating you should check if the pip and setuptools are installed on your system. It also shows the version numbers for both. You can find out if your pip or setuptools version is out of date due to which you are having the error issue. Follow the below steps to check the installed versions:
- Open the Command Prompt by searching it through the Windows search feature.
- Type the following command to get the list of installed packages.
pip list
Checking installed packages - If the setuptools is available in the packages list, it means it is already installed on your system. You can check the version and compare it with the latest version.
Upgrade setuptools
If the setuptools is already installed, then try updating it to the newest version. You can try the following steps to update your setuptools.
- Open the Command Prompt by searching it through the Windows search feature.
- Now type the following command to update the setuptools:
pip install –upgrade setuptools
Note: If you are on Terminal, make sure to add the “sudo” before the command.
- It will give an output of successfully installed. Now you can try using the command that gave the error in the first place.
Upgrade pip
Sometimes the issue resides in the pip itself. You can upgrade pip to fix the issue. You can follow the below steps to upgrade pip:
- Press the Windows + S key to open the Windows search feature. Now search for the Command Prompt and open it.
- To update the pip, try the following command:
python -m pip install -U pip
Upgrading pip - Now you can try installing your package with the pip command.
Try to Install the ez_setup
Some users got their issues fixed by installing the ez_setup module. Sometimes the module missing from your system can cause the issue. Installing it resolved the issue for many users. Follow the below steps:
- Hold the Windows key and press R to open the Run dialog box. Now type CMD in it and press the Enter key to open Command Prompt.
- Type the following command to install the ez_setup:
pip install ez_setup
Installing ez_setup - It will return the successfully installed message with the version name. You can now try using the package install command and see if it works.
Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.
Back to top button
Workable Solutions | Step-by-step Troubleshooting |
---|---|
Fix «Python Setup.py egg_info» | Method 1. Check if Pip and Setuptools Are…Full steps Method 2. Upgrade Pip…Full steps Method 3. Upgrade Setuptools…Full steps Method 4. Try to Install the ez_setup…Full steps |
Restore Data After Fixing the Error | Step 1. Run EaseUS Data Recovery Wizard. Choose the drive where you lost files and start scanning…Full steps |
«Python Setup.py egg_info» Failed with Error Code 1
As a python programmer, you have to use and integrate various other programming packages in your code. By packages, it simply means adding different codes written by others to add functionality to your program.
While integrating others’ code might sound hectic and challenging, it becomes easier with python package managers. But python programmers face «python setup.py egg_info» failed with error code 1 while installing packages.
Before you see how to fix «python setup.py egg_info» failed with error code 1, let’s see why common reasons why this error occurs in the first place.
- The issue with python package managers. The good news is that you do not have to manually add other programmers’ code (packages) into your code. You can do this job using python package managers such as PIP and SetupTools. However, if they are not installed correctly, you can face a «python setup.py egg_info» failure with error code 1.
- Using the old version of PIP. As you know, your package manager plays an important role when working with any programming language. Such is the case with python. If your python package manager PIP is outdated, you must update it. Otherwise, it will throw «python setup.py egg_info» failed with error code 1 while installing new packages.
- Setuptools version issue. With the PIP Python package manager, it is crucial to install Setuptools’ latest version. If you run an old version of Setuptools, it will also throw the «python setup.py egg_info» failed with error code 1.
- Missing ez_setup. ez_setup is another essential module required for python programming. Your system must have it installed; otherwise, you can get «python setup.py egg_info» failed with error code 1.
Those mentioned above are some of the common causes of «python setup.py egg_info» failing with error code 1. Now you know the reasons, let’s see how you can fix it.
4 Ways to «Python Setup.py egg_info» Failed with Error Code 1
The good news is that the workaround to fix the command «python setup.py egg_info» failed with error code 1 is simple. Our article introduces four easy methods to help you fix the error by yourself. Let’s see each method below with a step-by-step guide. Make sure to follow the tutorials thoroughly and not miss any steps.
Method 1. Check if Pip and Setuptools Are Installed Correctly
PIP and Setuptools are python package managers. They help you add external libraries, packages, and already written code in your python program. If missing or installed incorrectly, these tools can cause the command «python setup.py egg_info» to fail with error code 1.
Therefore, you need to check if both PIP and Setuptools are installed correctly in your system. Follow the below steps to check if PIP and Setuptools are installed correctly on your computer.
Step 1. Open Command Line Interface (CMD) on your computer.
You can do that by pressing Windows + R key, which will open the Run window. In the Run window, type CMD and press the Enter key.
Step 2. In CMD, enter the command pip list.
Running pip list will enlist if you have pip and setuptools installed and their version numbers.
Once you see both pip and setuptools installed from the pip list command, you must compare the version numbers. Make sure that both have their latest version installed on your computer. If the version is old, follow the upcoming methods to upgrade both pip and setuptools.
Method 2. Upgrade Pip to Fix «Python Setup.py egg_info»
The previous method showed you how to check if PIP is installed on your computer. Furthermore, if you have PIP installed but with an older version, then there is a high chance that you are facing the command «python setup.py egg_info» failing with error code 1.
Therefore, you need to upgrade the PIP on your computer. You can easily upgrade PIP on your computer and fix the command «python setup.py egg_info,» which failed with error code 1, by following the below steps.
Step 1. Open Command Line Interface (CMD) on your computer.
You can do that by pressing Windows + R key, which will open the Run window. In the Run window, type CMD and press the Enter key.
Step 2. In CMD, type python -m pip install -U pip.
Running the command will upgrade the PIP package installed on your computer. After PIP is upgraded, you can go ahead and install python packages without facing the command «python setup.py egg_info» failed with error code 1 issue.
Method 3. Upgrade Setuptools to Fix «Python Setup.py egg_info»
Setuptools package manager needs similar care as the pip python package manager. If you found from method 1 in this article that you are running an old version of Setuptools, you need to update it to get rid of the command «python setup.py egg_info,» which failed with error code 1.
Follow the below steps to upgrade Setuptools on your computer.
Step 1. Open Command Line Interface (CMD) on your computer.
You can do that by pressing Windows + R key, which will open the Run window. In the Run window, type CMD and press the Enter key.
Step 2. In CMD, type pip install -upgrade setuptools.
After running the above command, your system will upgrade the Setuptools package. You can now install other packages without facing the command «python setup.py egg_info,» which failed with the error code 1 issue.
Method 4. Try to Install the ez_setup
One major cause of the command «python setup.py egg_info» failing with error code 1 is due to the missing ez_setup module in your computer. Using pip package manager, you can easily install the ez_setup.
Follow the below steps to install the ez_setup on your computer using the pip package manager of python.
Step 1. Open Command Line Interface (CMD) on your computer.
You can do that by pressing Windows + R key, which will open the Run window. Then, in the Run window, type CMD and press the Enter key.
Step 2. In CMD, type the command pip install ez_setup
After that, the ez_setup module will work on your computer. Next, try to install new python packages, and hopefully, you won’t face the command «python setup.py egg_info» failing with the error code 1 issue.
How to Restore Data After Fixing Python Error Code 1
The users of the python community have reported that the command «python setup.py egg_info» failed with error code 1 and has caused data loss on their computers. So, if python deletes files while fixing this error, don’t worry, as you can restore it. EaseUS free data recovery software is a highly recommended tool for recovering any file in Windows 11/10/8/7 caused by the command «python setup.py egg_info» failed with error code 1 issue.
The key features provided by EaseUS Data Recovery Wizard make it a highly recommendable tool. Let’s see a few of its key features below.
- EaseUS Data Recovery Wizard helps you recover any accidentally deleted data from your computer.
- Data you lose during a Windows upgrade can be recovered with three steps.
- Data from network-attached storage can be recovered (NAS).
- Any external storage device, such as an external hard drive, can be used to retrieve data.
Step 1. Run EaseUS Data Recovery Wizard. Choose the drive where you lost files and start scanning. This software allows you to recover lost data from all devices, including HDD, SSD, USB drive, SD card, pen drive, camera, etc.
Step 2. Browse the full scan results. You can choose the file type you need by clicking on the file type filter. EaseUS data recovery software supports 1000+ file types like photos, videos, documents, emails, audio files, and many more.
Step 3. Select the files you want to preview. Click «Recover» and set a storage location to save the recovered data.
Conclusion
While installing new packages, Python programmers face the command «python setup.py egg_info» failed with error code 1 issue. But, the good news is that you can fix this issue by following four easy methods. Whenever you face the command «python setup.py egg_info» failing with error code 1, check that pip and setup tools are installed on your computer and their latest version.
You must upgrade the pip and setup tools if you don’t have the latest version. Also, ez_setup is another essential module present on your computer. You don’t have to face the command «python setup.py egg_info» failed with error code 1 issue.
One more important thing is that you can restore lost data. For example, the command «python setup.py egg_info» failed with an error code 1 issue using EaseUS Data Recovery Wizard. It is highly recommended and can recover your data from any scenario.
-
Partition Wizard
-
Partition Manager
- Python Setup.py egg_info Failed with Error Code 1? [Fixed]
By Ariel | Follow |
Last Updated December 28, 2022
When trying to install some packages with pip, a lot of users receive the “command «python setup.py egg_info» failed with error code 1” message. Fortunately, MiniTool summarizes several proven solutions to the error. Let’s start trying.
What causes the python setup.py egg_info failed with error code 1? According to user reports, the error often occurs when your pip or setuptools is outdated or installed improperly. If the ez_setup module is missing from your computer, you may also receive the pip install failed with error code 1. Here we provide 4 applicable ways to fix it. You can try them in order until the error gets resolved.
I’m new to Python and have been trying to install some packages with pip. But pip install unroll gives me: Command «python setup.py egg_info» failed with error code 1 in C:UsersMARKAN~1AppDataLocalTemppip-build-wa7uco0kunroll. How can I solve this?https://stackoverflow.com/questions/35991403/pip-install-unroll-python-setup-py-egg-info-failed-with-error-code-1
First of all, you should check if the pip and setuptools have been installed on your computer. It will show you the current version numbers of them. Once you find your pip or setuptools version is outdated, you can continue the following solutions to update them.
Here’s how to check the pip and setuptools installed version.
Step 1. Type cmd in the search box on the taskbar. And then right-click the Command Prompt app and select Run as administrator.
Step 2. In the elevated Command Prompt window, type the pip list command and hit Enter. Now, you can see the pip and setuptools version numbers are the lasted versions. If not, you can proceed with the following fixes to update them.
Tip: If the setuptools don’t appear in the list, you can install it from the PyPi official website.
If you have already installed the setuptools, you can follow the steps below to update it to the latest version.
Step 1. Open the elevated Command Prompt just like Step 1 in the above fix.
Step 2. Type the following command and hit Enter to update the setuptools.
Note: If you are on the Terminal window, make sure you run sudo pip install –upgrade setuptools.
pip install –upgrade setuptools
Once updated successfully, you can try installing the package again and see if the command «python setup.py egg_info» failed with error code 1 still appears.
Fix 3. Upgrade Pip
The command python setup.py egg_info failed with error code 1 can also be caused by the pip itself. If you are using an old version of pip, we recommend you update it to the latest version. To do so, you just need to run python -m pip install -U pip in the elevated Command Prompt.
Tip: If this command can’t fix the pip error code 1, you can try running the python3 -m pip3 install -U pip command.
Fix 4. Install the ez_setup Module
Sometimes the command python setup.py egg_info failed with error code 1 just occurs because the ez_setup module is missing from your system. In this case, installing ez_setup can help you fix the error.
Step 1. Open the elevated Command Prompt window again, and then type pip install ez_setup in it and hit Enter.
Step 2. If not working, try running the pip install unroll command.
Step 3. If it’s still not working, it’s possible that your pip didn’t install/upgrade properly. To fix it, try running the easy_install -U setuptools command. And run pip install unroll again.
After you installed ez_setup module successfully, try installing the package and see if the pip error code 1 gets fixed.
About The Author
Position: Columnist
Ariel is an enthusiastic IT columnist focusing on partition management, data recovery, and Windows issues. She has helped users fix various problems like PS4 corrupted disk, unexpected store exception error, the green screen of death error, etc. If you are searching for methods to optimize your storage device and restore lost data from different storage devices, then Ariel can provide reliable solutions for these issues.
If you are trying to install a Python package and are seeing the error message Command python setup.py egg_info failed with error code 1, don’t worry – you’re not alone! This can be a frustrating error to encounter, but fortunately, there is a solution.
In this blog post, we will walk you through the steps to resolving this issue.
When you’re trying to install a Python package, you may encounter the command “python setup.py egg_info” failing with error code 1. This error message indicates an issue with the Python installation on your computer.
Follow the methods below to resolve this issue.
Method 1: Check if Python is Installed
Python may be missing from your system. Check if Python is installed by running the following command:
C:WindowsSystem32>python -V
'python' is not recognized as an internal or external command,
operable program or batch file.
If you get the error above, it means Python is not installed on your computer.
Follow the steps below to install Python:
- Download Python from python.org.
- Once downloaded, run the executable file.
- Proceed with the steps to install Python.
- After the installation has been completed, run the above command again.
Method 2: Check if PIP is Installed
Although Python may be installed, PIP may not have gotten installed. PIP is a package management system written in Python. It’s used to install and manage software packages. Check if PIP is installed by running the following command:
If you don’t get the output above, it means PIP isn’t installed on your computer. Follow the steps below to install PIP on Windows:
- At the Windows search bar, type cmd.
- When the Command Prompt window appears, click Run as administrator.
- At the Command Prompt window, download the get-pip.py file by running the following command:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
To install PIP, type:
python get-pip.py
Once installed, you should upgrade to the latest version by running the command:
pip install --upgrade pip
Once pip has been installed, you can verify if it’s working by listing all the installed packages.
pip list
Setuptools is a collection of enhancements to the Python distribution that allows developers to build and distribute Python packages.
You may encounter the command “python setup.py egg_info” failing with error code 1 if the setuptools are not installed or outdated.
Upgrade setuptools by running the following command:
pip install --upgrade setuptools
Conclusion
Hopefully one of these solutions will fix your issue. If not, please feel free to reach out to us for help. We’re here to help!
Pipenv install
is trying to install a library on a different python version.
I set pipenv to python 3.4.2 version, however, when I run pip install
I get the following error :
And as you can see it’s trying to install a library on python2.7
(default python version).
Steps:
pip install pipenv
cd /path-project
pipenv —three
pipenv install
Got the error
pipenv —version
pipenv, version 6.2.1
Pipfile.lock
{
"_meta": {
"hash": {
"sha256": "664809faca877e7d72716808d6be74ced6c98b258f95e418b5ee4a4b57762626"
},
"host-environment-markers": {
"implementation_name": "cpython",
"implementation_version": "3.4.2",
"os_name": "posix",
"platform_machine": "x86_64",
"platform_python_implementation": "CPython",
"platform_release": "16.7.0",
"platform_system": "Darwin",
"platform_version": "Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64",
"python_full_version": "3.4.2",
"python_version": "3.4",
"sys_platform": "darwin"
},
"pipfile-spec": 3,
"requires": {},
"sources": [
{
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {
....
ignacio-chiazzo
changed the title
Command «python setup.py egg_info»
Command «python setup.py egg_info» failed with error code 1 i
Sep 10, 2017
Did you install pipenv with Python 2.7? It’s using that pip to resolve the dependencies.
pip version:
pip 9.0.1 from /home/joshua/.local/lib/python3.5/site-packages (python 3.5)
python version:
Python 3.5.2
I was using pipenv to setup an python2
venv when got this error
File "/home/joshua/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp9b9z51_sbuild/scapy/
sounds like you’re having trouble installing a python module — not a pipenv problem
I am also suffering this issue. But it is hard to recreate it. It just happens sometimes.
I have no problems with exact same packages with pip
, and as I can see they are installed. It is breaking on ‘Locking dev-dependencies’:
Adding pre-commit==1.1.2 to Pipfile's [dev-packages]…
Locking [dev-packages] dependencies…
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 1532, in install
do_lock(system=system)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 907, in do_lock
project=project
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/utils.py", line 217, in resolve_deps
resolved_tree = resolver.resolve()
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 195, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 274, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 145, in get_dependencies
self._dependencies_cache[ireq] = reqset._prepare_file(self.finder, ireq)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 439, in run_egg_info
command_desc='python setup.py egg_info')
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/qn/2gssw9hx48g81chw0398hlrr0000gn/T/tmpf93If1build/ipython/
I’ve seen this behavior too — seems to be non-deterministic, and highly-dependent on the python environment.
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
[dev-packages]
flake8-builtins = "==0.2"
flake8-commas = "==0.4.3"
flake8-quotes = "==0.9.0"
pytest = "==3.0.7"
pytest-flake8 = "==0.8.1"
pytest-isort = "==0.1.0"
ipython = "*"
gitlint = "*"
flake8-blind-except = "*"
pytest-django = "*"
pytest-xdist = "*"
safety = "*"
django-debug-toolbar = "*"
pre-commit = "==1.1.2"
[packages]
django = ">=1.11,<1.12"
django-split-settings = "*"
psycopg2 = "*"
django-axes = "*"
Link: https://github.com/wemake-services/wemake-django-template/blob/master/%7B%7B%20cookiecutter.project_name%20%7D%7D/Pipfile
After removing ipython
from Pipfile
everything worked well.
@sobolevn interesting. I locked that pipfile 5 times locally and everything worked fine.
What data can I provide to help you with troubleshooting?
None, other than running $ pipenv lock --verbose
Sounds like one of the packages has a wonky setup.py file — nothing we can do about that. If you think it’s ipython, that wouldn’t surprise me one bit.
» pipenv lock --verbose
Locking [dev-packages] dependencies…
ROUND 1
Current constraints:
django-debug-toolbar
flake8-blind-except
flake8-builtins==0.2
flake8-commas==0.4.3
flake8-quotes==0.9.0
gitlint
ipython
pre-commit==1.1.2
pytest==3.0.7
pytest-django
pytest-flake8==0.8.1
pytest-isort==0.1.0
pytest-xdist
safety
Finding the best candidates:
found candidate django-debug-toolbar==1.8 (constraint was <any>)
found candidate flake8-blind-except==0.1.1 (constraint was <any>)
found candidate flake8-builtins==0.2 (constraint was ==0.2)
found candidate flake8-commas==0.4.3 (constraint was ==0.4.3)
found candidate flake8-quotes==0.9.0 (constraint was ==0.9.0)
found candidate gitlint==0.8.2 (constraint was <any>)
found candidate ipython==6.2.0 (constraint was <any>)
found candidate pre-commit==1.1.2 (constraint was ==1.1.2)
found candidate pytest==3.0.7 (constraint was ==3.0.7)
found candidate pytest-django==3.1.2 (constraint was <any>)
found candidate pytest-flake8==0.8.1 (constraint was ==0.8.1)
found candidate pytest-isort==0.1.0 (constraint was ==0.1.0)
found candidate pytest-xdist==1.20.0 (constraint was <any>)
found candidate safety==1.5.1 (constraint was <any>)
Finding secondary dependencies:
pre-commit==1.1.2 requires aspy.yaml, cached-property, identify>=1.0.0, nodeenv>=0.11.1, pyyaml, six, virtualenv
pytest-xdist==1.20.0 requires execnet>=1.1, pytest-forked, pytest>=3.0.0
flake8-commas==0.4.3 requires flake8<4.0.0,>=2
gitlint==0.8.2 requires arrow==0.10.0, Click==6.6, ordereddict==1.1, sh==1.11; sys_platform != "win32"
flake8-blind-except==0.1.1 requires setuptools
pytest==3.0.7 requires py>=1.4.29, setuptools
flake8-quotes==0.9.0 requires flake8
ipython==6.2.0 not in cache, need to check index
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 1649, in lock
do_lock(verbose=verbose, clear=clear)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/cli.py", line 907, in do_lock
project=project
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/utils.py", line 217, in resolve_deps
resolved_tree = resolver.resolve()
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 107, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 195, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/resolver.py", line 274, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/piptools/repositories/pypi.py", line 145, in get_dependencies
self._dependencies_cache[ireq] = reqset._prepare_file(self.finder, ireq)
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 439, in run_egg_info
command_desc='python setup.py egg_info')
File "/Users/sobolev/.pipsi/pipenv/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/qn/2gssw9hx48g81chw0398hlrr0000gn/T/tmpy2igTrbuild/ipython/
Also, safety is built into pipenv now! You can just run pipenv check
and it’ll run safety for you
Yeah, i’m not sure there’s anything we can do about that. I’d raise the issue with pip-tools, see if they have any answers.
Check out pipenv check
and let me know what you think
Nice! Replaced my old configuration with pipenv check
.
Hi, this happened to me as well on package psycopg2.
The requirements.txt contained a ref to pscopg2==2.6.2. I have version 2.7.2.
When I updated the requirements.txt to ==2.7.2, pipenv install worked fine.
I am getting the same error trying to install jupyter
.
I create a new environment
pipenv --three
then I try to install
pipenv install jupyter
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/pipenv/cli.py", line 1847, in install
do_lock(system=system, pre=pre)
File "/usr/local/lib/python2.7/site-packages/pipenv/cli.py", line 1082, in do_lock
pre=pre
File "/usr/local/lib/python2.7/site-packages/pipenv/utils.py", line 452, in resolve_deps
resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 200, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 278, in _iter_dependencies
for dependency in self.repository.get_dependencies(ireq):
File "/usr/local/lib/python2.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 153, in get_dependencies
result = reqset._prepare_file(self.finder, ireq)
File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 639, in _prepare_file
abstract_dist.prep_for_dist()
File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 134, in prep_for_dist
self.req_to_install.run_egg_info()
File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 438, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/local/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/g1/srsny26x1ddfd469qxj675zw0000gn/T/tmpxfkWdlbuild/functools32/
If I run pip install --three jupyter
, it removes the existing Python3 environment, creates a new Python3 environment and then I get the same error message again.
If I remove the Pipfile
and Pipfile.lock
and redo using Python 2 pip install --two jupyter
, everything runs smoothly and installs.
It seems that if you want to install Jupyter
for a Python3 environment, it wants to be installed using pip3
explicitly (at least that is what they say in the installation instructions).
If I understand correctly, pipenv
will invoke pip
to do the package installation but if you have a legacy Python2 installation, pip
will point to pip2
. So what do you do in this case when you want to create a Python3 environment?
My expectation was that when I create a new environment with pipenv --three
, it should invoke pip3 each time I install a package via pipenv install package
. It doesn’t seem to be the case or am I doing something wrong?
@nsecord please open a separate issue and provide relevant information including everything the issue template asks for as well as the output of which pip && which pipenv && which python && pip --version && pipenv --version && python --version && env
I had the same problem. Upgrading the pip from 8 to 9, resolved my issue!
for me, on Mac OSX High Sierra, what fixed my issue with getting the error message: Command «python setup.py egg_info» failed with error code 1
sudo pip install pyobjc-core
sudo pip install pyobjc
I had this problem on macOS. I fixed it by removing everything installed through homebrew and re-installing Python 3.6.
Hello, am facing the same error on windows:
-
installed python-3.6.4-embed-amd64 as a zip file
-set PATH env variable for python, installed pip
-when i run python -m pip install awscli i get below error:Running setup.py (path:C:UsersuserAppDataLocalTemppip-build-7grntnirPyYAMLsetup.py) egg_info for package PyYAML
Running command python setup.py egg_info
running egg_info
creating pip-egg-infoPyYAML.egg-info
writing pip-egg-infoPyYAML.egg-infoPKG-INFO
writing dependency_links to pip-egg-infoPyYAML.egg-infodependency_links.txt
writing top-level names to pip-egg-infoPyYAML.egg-infotop_level.txt
writing manifest file ‘pip-egg-infoPyYAML.egg-infoSOURCES.txt’
error: [Errno 2] No such file or directory: ‘C:python-3.6.4-embed-amd64python36.ziplib2to3Grammar.txt’
Cleaning up…
Command «python setup.py egg_info» failed with error code 1 in C:UsersuserAppDataLocalTemppip-build-7grntnirPyYAML
Exception information:
Traceback (most recent call last):
File «C:python-3.6.4-embed-amd64libsite-packagespipbasecommand.py», line 215, in main
status = self.run(options, args)
File «C:python-3.6.4-embed-amd64libsite-packagespipcommandsinstall.py», line 335, in run
wb.build(autobuilding=True)
File «C:python-3.6.4-embed-amd64libsite-packagespipwheel.py», line 749, in build
self.requirement_set.prepare_files(self.finder)
File «C:python-3.6.4-embed-amd64libsite-packagespipreqreq_set.py», line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File «C:python-3.6.4-embed-amd64libsite-packagespipreqreq_set.py», line 634, in prepare_file
abstract_dist.prep_for_dist()
File «C:python-3.6.4-embed-amd64libsite-packagespipreqreq_set.py», line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File «C:python-3.6.4-embed-amd64libsite-packagespipreqreq_install.py», line 439, in run_egg_info
command_desc=’python setup.py egg_info’)
File «C:python-3.6.4-embed-amd64libsite-packagespiputils_init.py», line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command «python setup.py egg_info» failed with error code 1 in C:UsersuserAppDataLocalTemppip-build-7grntnirPyYAML
Though the error complains about this file missing: error: [Errno 2] No such file or directory: ‘C:python-3.6.4-embed-amd64python36.ziplib2to3Grammar.txt’
i have this file in that the same location, still i have this error. Any help appreciated!
My pip version is:
C:python-3.6.4-embed-amd64Libsite-packagespip>python -m pip —version
pip 9.0.1 from C:python-3.6.4-embed-amd64libsite-packages (python 3.6)
macOS Sierra
upgrading pyobjc-core also worked for me.
hello dear sir/mam , I m also getting same error in python 3.4 plzz help me.
C:Users>pip install oauth2==1.5.211
Collecting oauth2==1.5.211
Using cached https://files.pythonhosted.org/packages/ef/36/7da831a06da70fb15858773a1d709606abcd05fae417bdf7a8cf5349450c/oauth2-1.5.211.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File «», line 1, in
File «C:UsersAppDataLocalTemppip-install-oef36la6oauth2setup.py», line 18
print «unable to find version in %s» % (VERSIONFILE,)
^
SyntaxError: invalid syntax
----------------------------------------
Command «python setup.py egg_info» failed with error code 1 in C:UserAppDataLocalTemppip-install-oef36la6oauth2
@Sunilsma oauth2 1.5.211 does not support Python 3.4. You can clearly see Python 2 syntax in the traceback, which shouldn’t have triggered alarms if you read it. I don’t know what you’re trying to achieve here.
Command «python setup.py egg_info» failed with error code 1 in /tmp/pip-install-ZPv0av/cairocffi/
I am facing this issue please help.
we have significantly better error handling around this in an upcoming release
that said, you would need to provide additional detail to troubleshoot your actual problem which may or may not be resolved by that error handling.
@techalchemy how do we get better error logs from this? I’m passing --verbose
and still just getting this pipenv.patched.notpip._internal.exceptions.InstallationError
with no other output.
I am getting error
pipenv.patched.notpip._internal.exceptions.InstallationError: Command «python setup.py egg_info» failed with error code 1 in /tmp/tmpapn40oefbuild/mysql-python/
Код ошибки 1 определяется как операция, запрещенная в стандартных системных символах errno Python. Эта проблема чаще всего возникает, когда ваши инструменты установки не установлены или не обновлены. В этой статье мы предоставили методы, которые решили проблему для большинства пользователей, связанную с этой конкретной ошибкой.
Код ошибки 1 в Python
Проверьте, правильно ли установлены ваш pip и setuptools.
Перед обновлением вы должны проверить, установлены ли в вашей системе pip и setuptools. Он также показывает номера версий для обоих. Вы можете узнать, устарела ли ваша версия программы или setuptools, из-за которой у вас возникла ошибка. Выполните следующие шаги, чтобы проверить установленные версии:
- Откройте командную строку, выполнив поиск с помощью функции поиска Windows.
- Введите следующую команду, чтобы получить список установленных пакетов. Pip list.Проверка установленных пакетов
- Если инструменты установки доступны в списке пакетов, это означает, что они уже установлены в вашей системе. Вы можете проверить версию и сравнить ее с последней версией.
Обновите инструменты настройки
Если инструменты установки уже установлены, попробуйте обновить их до последней версии. Вы можете попробовать следующие шаги, чтобы обновить свои инструменты настройки.
- Откройте командную строку, выполнив поиск с помощью функции поиска Windows.
- Теперь введите следующую команду, чтобы обновить инструменты установки: pip install –upgrade setuptools
Примечание. Если вы находитесь в Терминале, не забудьте добавить «sudo» перед командой.
Обновление инструментов настройки
- Это даст результат успешно установлен. Теперь вы можете попробовать использовать команду, которая изначально выдавала ошибку.
Обновление пункта
Иногда проблема кроется в самом пункте. Вы можете обновить pip, чтобы решить эту проблему. Вы можете выполнить следующие шаги, чтобы обновить pip:
- Нажмите клавишу Windows + S, чтобы открыть функцию поиска Windows. Теперь найдите командную строку и откройте ее.
- Чтобы обновить пип, попробуйте следующую команду: python -m pip install -U pipОбновление пункта
- Теперь вы можете попробовать установить свой пакет с помощью команды pip.
Попробуйте установить ez_setup
Некоторые пользователи исправили свои проблемы, установив модуль ez_setup. Иногда причиной проблемы может быть модуль, отсутствующий в вашей системе. Установка решила проблему для многих пользователей. Выполните следующие шаги:
- Удерживая клавишу Windows, нажмите R, чтобы открыть диалоговое окно «Выполнить». Теперь введите в нем CMD и нажмите клавишу Enter, чтобы открыть командную строку.
- Введите следующую команду, чтобы установить ez_setup: pip install ez_setupУстановка ez_setup
- Он вернет сообщение об успешной установке с названием версии. Теперь вы можете попробовать использовать команду установки пакета и посмотреть, работает ли она.
Download PC Repair Tool to quickly find & fix Windows errors automatically
If you see Command python setup.py egg_info failed with error code 1 when Installing Python, then the setup tool on your computer might not be installed or updated. In this article, we will fix this error with some simple solutions.
These are the things you need to do to fix ‘Command “python setup.py egg_info” failed with error code 1’ When Installing Python. Make sure to follow the instructions in the given order.
- Check if PIP and Setuptools are installed.
- Upgrade PIP and Setuptools
- Install ez_Setup
Let us talk about them in detail.
1] Check if PIP and Setuptools are installed
The first thing you need to check is if PIP and Setuptools are installed. It is an easy task and you just need to execute a command. Launch Command Prompt as an administrator from the Start Menu and run the following command.
pip list
This way you will be able to see a list of packages that you have installed. If you can see “Setuptools” there, Setuptools is installed on your system. You can check the version and see if it is the latest one.
If you don’t have Setuptools installed on your computer, install it by executing the following command.
pip install setuptools
This will install the latest version of the package.
2] Update PIP and Setuptools
Now, you need to update both PIP and Setuptools and see if that fixes the issue.
Launch Command Prompt as an administrator.
To update Setuptools, you need to run the following command.
pip install –upgrade setuptools
To update PIP, you need to run the following command.
python -m pip install -U pip
After doing the same, you need to check if the issue is fixed.
3] Install ez_Setup
If ez_Setup is not installed on your system, you may face this issue. For that, you can install ez_Setup with the help of a command. So, launch Command Prompt as an administrator from the Start Menu and run the following command.
pip install ez_setup
Now, check if the issue persists.
Hopefully, you are able to fix the error with the given solutions.
How to install Python 3 on Windows 10?
To install Python 3 on Windows 10, you can follow the given steps.
- Download the latest Python version from python.org.
- Run the executable file.
- Now, click Install now, make sure to include PIP and IDLE and check “Add Python to PATH”.
- You will be asked if you want to Disable path length limit. This will allow python to bypass the 260-character MAX_PATH limit.
- This will install Python on your computer.
If you want to see if Python 3 is installed on your computer, navigate to the following location.
C:UsersUsernameAppDataLocalProgramsPythonPython37
And there you can see Python.exe. This means that Python is installed on your computer.
Read Next: How to open and view Python PY files on Windows PC.
Yusuf is currently pursuing B.Tech in Delhi. He is a keen follower of the Windows ecosystem and enjoys working on his Windows 11 PC.