Skip to content

Assertion Error: assert not (home and prefix) #8438

@weilueluo

Description

@weilueluo

Environment

  • pip version: 20.1.1
  • Python version: 3.8.3
  • OS: Windows 10

PIP_CACHE_DIR = D:\Environments\Python\pip cache dir
PIP_TARGET = D:\Environments\Python\Lib\site-packages

Description

A weird error when I tried to install pyinstaller

Expected behavior
install normally

How to Reproduce

pip install pyinstaller

Output

Collecting pyinstaller
  Using cached PyInstaller-3.6.tar.gz (3.5 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 2:
   command: 'd:\environments\python\python.exe' 'd:\environments\python\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'D:\Environments\TEMP\pip-build-env-siqaoa6a\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (22 lines):
  Collecting setuptools>=40.8.0
    Using cached setuptools-47.1.1-py3-none-any.whl (583 kB)
  Collecting wheel
    Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Installing collected packages: setuptools, wheel
  ERROR: Exception:
  Traceback (most recent call last):
    File "d:\environments\python\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in _main
      status = self.run(options, args)
    File "d:\environments\python\lib\site-packages\pip\_internal\cli\req_command.py", line 185, in wrapper
      return func(self, options, args)
    File "d:\environments\python\lib\site-packages\pip\_internal\commands\install.py", line 398, in run
      installed = install_given_reqs(
    File "d:\environments\python\lib\site-packages\pip\_internal\req\__init__.py", line 67, in install_given_reqs
      requirement.install(
    File "d:\environments\python\lib\site-packages\pip\_internal\req\req_install.py", line 769, in install
      scheme = get_scheme(
    File "d:\environments\python\lib\site-packages\pip\_internal\locations.py", line 185, in get_scheme
      scheme = distutils_scheme(
    File "d:\environments\python\lib\site-packages\pip\_internal\locations.py", line 118, in distutils_scheme
      assert not (home and prefix), "home={} prefix={}".format(home, prefix)
  AssertionError: home=D:\Environments\TEMP\pip-target-wydanjze prefix=D:\Environments\TEMP\pip-build-env-siqaoa6a\overlay
  ----------------------------------------
ERROR: Command errored out with exit status 2: 'd:\environments\python\python.exe' 'd:\environments\python\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'D:\Environments\TEMP\pip-build-env-siqaoa6a\overlay' --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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S: needs triageIssues/PRs that need to be triaged

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions