Error installing any libraries in paycharm


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 -- '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 "", line 216, in _main
      status =, args)
    File "", line 182, in wrapper
      return func(self, options, args)
    File "", line 412, in run
      installed = install_given_reqs(
    File "", line 82, in install_given_reqs
    File "", line 778, in install
      scheme = get_scheme(
    File "", line 185, in get_scheme
      scheme = distutils_scheme(
    File "", 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 -- 'setuptools>=40.8.0' wheel Check the logs for full command output.`

Important nuances:

  1. I have a new project in paycharm without modules.
  2. Pure Python 3.9
  3. pip (python 3.8).
  4. I am not an admin in Windows 10 system.
  5. I correctly added Python 3.9 to the system path.
  6. Installing libraries through the interpreter settings also gives the same error
  7. I reinstalled python and paycharm
  8. I tried writing pip3 and --no-user
Asked By: RomanUnreal



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.

Answered By: AKX
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.