Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Environment created from another environment ignores --no-pip, --no-wheel, --no-setuptools options #1712

Closed
xvik opened this issue Mar 11, 2020 · 1 comment
Labels
bug

Comments

@xvik
Copy link

@xvik xvik commented Mar 11, 2020

Issue

Affected: virtualenv 20.0.x

When environment created from another environment with --no-pip option, pip is still installed.
It is working with virtualenv 16.x (regression)

Case:

  • Create first environt and install vitrtualenv inside it:
    virtualenv one
    one/bin/python -m pip install virtualenv

  • Create second environment with no pip:
    one/bin/python -m virtualenv two --no-pip

Result: pip installed
Expected: no pip should be installed

(same with other flags)

Environment

  • OS: ubuntu 19.10
  • packages: python3, python3-pip
  • pip updated, virtualenv installed with pip

Output of the virtual environment creation

The above case execution:

xvik@xvik:/tmp$ python3 --version
Python 3.7.5
xvik@xvik:/tmp$ python3 -m pip --version
pip 20.0.2 from /home/xvik/.local/lib/python3.7/site-packages/pip (python 3.7)
xvik@xvik:/tmp$ python3 -m virtualenv --version
virtualenv 20.0.10 from /home/xvik/.local/lib/python3.7/site-packages/virtualenv/__init__.py

xvik@xvik:/tmp$ python3 -m virtualenv one
created virtual environment CPython3.7.5.final.0-64 in 140ms
  creator CPython3Posix(dest=/tmp/one, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/xvik/.local/share/virtualenv/seed-app-data/v1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

xvik@xvik:/tmp$ one/bin/python -m pip install virtualenv
Collecting virtualenv
  Using cached virtualenv-20.0.10-py2.py3-none-any.whl (4.6 MB)
Collecting six<2,>=1.9.0
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting importlib-metadata<2,>=0.12; python_version < "3.8"
  Using cached importlib_metadata-1.5.0-py2.py3-none-any.whl (30 kB)
Collecting filelock<4,>=3.0.0
  Using cached filelock-3.0.12-py3-none-any.whl (7.6 kB)
Collecting appdirs<2,>=1.4.3
  Using cached appdirs-1.4.3-py2.py3-none-any.whl (12 kB)
Processing /home/xvik/.cache/pip/wheels/a2/19/da/a15d4e2bedf3062c739b190d5cb5b7b2ecfbccb6b0d93c861b/distlib-0.3.0-py3-none-any.whl
Collecting zipp>=0.5
  Using cached zipp-3.1.0-py3-none-any.whl (4.9 kB)
Installing collected packages: six, zipp, importlib-metadata, filelock, appdirs, distlib, virtualenv
Successfully installed appdirs-1.4.3 distlib-0.3.0 filelock-3.0.12 importlib-metadata-1.5.0 six-1.14.0 virtualenv-20.0.10 zipp-3.1.0

xvik@xvik:/tmp$ one/bin/python -m virtualenv two --no-pip -v
find interpreter for spec PythonSpec(path=/tmp/one/bin/python)
proposed PythonInfo(spec=CPython3.7.5.final.0-64, system=/usr/bin/python3.7, exe=/tmp/one/bin/python, platform=linux, version='3.7.5 (default, Nov 20 2019, 09:21:52) \n[GCC 9.2.1 20191008]', encoding_fs_io=utf-8-UTF-8)
create virtual environment via CPython3Posix(dest=/tmp/two, clear=False, global=False)
add seed packages via FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/xvik/.local/share/virtualenv/seed-app-data/v1)
changing mode of /tmp/two/bin/wheel to 755
changing mode of /tmp/two/bin/wheel-3.7 to 755
changing mode of /tmp/two/bin/wheel3 to 755
changing mode of /tmp/two/bin/easy_install to 755
changing mode of /tmp/two/bin/easy_install-3.7 to 755
changing mode of /tmp/two/bin/easy_install3 to 755
changing mode of /tmp/two/bin/pip3 to 755
changing mode of /tmp/two/bin/pip-3.7 to 755
changing mode of /tmp/two/bin/pip to 755
add activators for Bash, CShell, Fish, PowerShell, Python, Xonsh
created virtual environment CPython3.7.5.final.0-64 in 133ms
  creator CPython3Posix(dest=/tmp/two, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/xvik/.local/share/virtualenv/seed-app-data/v1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator

xvik@xvik:/tmp$ two/bin/python -m pip --version
pip 20.0.2 from /tmp/two/lib/python3.7/site-packages/pip (python 3.7)
@gaborbernat

This comment has been minimized.

Copy link
Contributor

@gaborbernat gaborbernat commented Mar 19, 2020

Hello, a fix for this issue has been released via virtualenv 20.0.11; see https://pypi.org/project/virtualenv/20.0.11/ (https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-11-2020-03-18). Please give a try and report back if your issue has not been addressed; if not, please comment here, and we'll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release.
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.