Skip to content

site.getsitepackages() doesn't respect --system-site-packages on python2 #2106

@freundTech

Description

@freundTech

Issue

site.getsitepackages() doesn't respect --system-site-packages being set on python2. System site-package paths are never included.
I came across this while working on #2105. In contrast to #2105 this is not specific to debian, which is why I am creating a separate issue for it.

python -m virtualenv --system-site-packages -ppython2 testenv
. testenv/bin/activate
python -c "import site; print(site.getsitepackages())"
['/home/adrian/Documents/dev/uni/bachelor/mypy/testenv/lib/python2.7/site-packages', '/home/adrian/Documents/dev/uni/bachelor/mypy/testenv/lib/site-python']

Environment

Provide at least:

  • OS: Tested on both Ubuntu 18.04.3 LTS and Arch Linux
  • pip list of the host python where virtualenv is installed:

Same as #2105

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:
Same as #2105

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions