Skip to content

--site-packages is not recognized without --two or --three option #3351

Closed
@nonylene

Description

@nonylene

Issue description

--site-packages is not recognized without --two or --three option.

PR: #3352

Reason

site_packages argument in cli function always set to false because --site-packages flag was defined in the global state (

self.site_packages = False
).

However, with --two or --three option, we can run into the block creates virtualenv (

if (state.python or state.three is not None) or site_packages:
). Since state.site_packages is used in this block, pipenv recognizes --site-packages flag well and creates virtualenv created with --system-site-packages.

Expected result

pipenv --site-packgages install creates virtualenv with --system-site-packages

Actual result

pipenv --site-packgages install doesn't create virtualenv that uses system packages.

However, pipenv --two --site-packages install or pipenv --three --site-packages works as expected.

UPDATE: However pipenv --two --site-packages install or pipenv --three --site-packages works as expected for the first installation, pipenv recreates virtualenv without --system-site-packages right after the first install. I think this is a different issue. (pipenv --two install also creates twice.)

Alternatively, pipenv --two --site-packages works well.

Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).

  • $ pipenv --two --site-packages install (UPDATE: or pipenv --two --site-packages)

This outputs Making site-packages available….

  • $ pipenv --site-packages install

This doesn't print Making site-packages available….

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions