Error installing any libraries in paycharm
Question:
After calling the "pip install
" command of any library, an error occurs:
ERROR: Command errored out with exit status 2:
command: 'c:usersromanappdatalocalprogramspythonpython38python.exe' 'c:usersromanappdatalocalprogramspythonpython38libsite-packagespip' install -
-ignore-installed --no-user --prefix 'C:UsersromanAppDataLocalTemppip-build-env-2tu6fau4overlay' --no-warn-script-location --no-binary :none: --only-binary :no
ne: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (24 lines):
Collecting setuptools>=40.8.0
Using cached setuptools-67.0.0-py3-none-any.whl (1.1 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Installing collected packages: setuptools, wheel
ERROR: Exception:
Traceback (most recent call last):
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalclibase_command.py", line 216, in _main
status = self.run(options, args)
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalclireq_command.py", line 182, in wrapper
return func(self, options, args)
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalcommandsinstall.py", line 412, in run
installed = install_given_reqs(
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalreq__init__.py", line 82, in install_given_reqs
requirement.install(
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalreqreq_install.py", line 778, in install
scheme = get_scheme(
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internallocations.py", line 185, in get_scheme
scheme = distutils_scheme(
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internallocations.py", line 118, in distutils_scheme
assert not (home and prefix), "home={} prefix={}".format(home, prefix)
AssertionError: home=C:UsersromanAppDataLocalTemppip-target-tdo35poo prefix=C:UsersromanAppDataLocalTemppip-build-env-2tu6fau4overlay
WARNING: You are using pip version 20.2.1; however, version 22.3.1 is available.
You should consider upgrading via the 'c:usersromanappdatalocalprogramspythonpython38python.exe -m pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 2: 'c:usersromanappdatalocalprogramspythonpython38python.exe' 'c:usersromanappdatalocalprogramspythonpython
38libsite-packagespip' install --ignore-installed --no-user --prefix 'C:UsersromanAppDataLocalTemppip-build-env-2tu6fau4overlay' --no-warn-script-location -
-no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.`
Important nuances:
- I have a new project in paycharm without modules.
- Pure Python 3.9
- pip (python 3.8).
- I am not an admin in Windows 10 system.
- I correctly added Python 3.9 to the system path.
- Installing libraries through the interpreter settings also gives the same error
- I reinstalled python and paycharm
- I tried writing
pip3
and --no-user
Answers:
Upon googling the error assert not (home and prefix)
, we can find this pypa/pip issue where someone has solved this by making sure their pip.conf
doesn’t have a target
line.
You should make sure your pip configuration files don’t have extraneous cruft left over in them and/or that nothing has set a PIP_TARGET
environment variable or similar.
After calling the "pip install
" command of any library, an error occurs:
ERROR: Command errored out with exit status 2:
command: 'c:usersromanappdatalocalprogramspythonpython38python.exe' 'c:usersromanappdatalocalprogramspythonpython38libsite-packagespip' install -
-ignore-installed --no-user --prefix 'C:UsersromanAppDataLocalTemppip-build-env-2tu6fau4overlay' --no-warn-script-location --no-binary :none: --only-binary :no
ne: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
cwd: None
Complete output (24 lines):
Collecting setuptools>=40.8.0
Using cached setuptools-67.0.0-py3-none-any.whl (1.1 MB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Installing collected packages: setuptools, wheel
ERROR: Exception:
Traceback (most recent call last):
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalclibase_command.py", line 216, in _main
status = self.run(options, args)
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalclireq_command.py", line 182, in wrapper
return func(self, options, args)
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalcommandsinstall.py", line 412, in run
installed = install_given_reqs(
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalreq__init__.py", line 82, in install_given_reqs
requirement.install(
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internalreqreq_install.py", line 778, in install
scheme = get_scheme(
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internallocations.py", line 185, in get_scheme
scheme = distutils_scheme(
File "c:usersromanappdatalocalprogramspythonpython38libsite-packagespip_internallocations.py", line 118, in distutils_scheme
assert not (home and prefix), "home={} prefix={}".format(home, prefix)
AssertionError: home=C:UsersromanAppDataLocalTemppip-target-tdo35poo prefix=C:UsersromanAppDataLocalTemppip-build-env-2tu6fau4overlay
WARNING: You are using pip version 20.2.1; however, version 22.3.1 is available.
You should consider upgrading via the 'c:usersromanappdatalocalprogramspythonpython38python.exe -m pip install --upgrade pip' command.
----------------------------------------
ERROR: Command errored out with exit status 2: 'c:usersromanappdatalocalprogramspythonpython38python.exe' 'c:usersromanappdatalocalprogramspythonpython
38libsite-packagespip' install --ignore-installed --no-user --prefix 'C:UsersromanAppDataLocalTemppip-build-env-2tu6fau4overlay' --no-warn-script-location -
-no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.`
Important nuances:
- I have a new project in paycharm without modules.
- Pure Python 3.9
- pip (python 3.8).
- I am not an admin in Windows 10 system.
- I correctly added Python 3.9 to the system path.
- Installing libraries through the interpreter settings also gives the same error
- I reinstalled python and paycharm
- I tried writing
pip3
and--no-user
Upon googling the error assert not (home and prefix)
, we can find this pypa/pip issue where someone has solved this by making sure their pip.conf
doesn’t have a target
line.
You should make sure your pip configuration files don’t have extraneous cruft left over in them and/or that nothing has set a PIP_TARGET
environment variable or similar.