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

virtualenv ignores VIRTUALENV_ALWAYS_COPY environment variable #1761

Closed
lucidyan opened this issue Apr 6, 2020 · 5 comments · Fixed by #1763
Closed

virtualenv ignores VIRTUALENV_ALWAYS_COPY environment variable #1761

lucidyan opened this issue Apr 6, 2020 · 5 comments · Fixed by #1763
Assignees

Comments

@lucidyan
Copy link

lucidyan commented Apr 6, 2020

Issue

Virtualenv ignores VIRTUALENV_ALWAYS_COPY environment variable (it's important for wrappers like pipenv where we can't use it as flags).

For example, with VIRTUALENV_COPIES works as expected:

VIRTUALENV_COPIES=1 virtualenv .venv -vvv --with-traceback && ls -al ./.venv/bin/python

lrwxrwxrwx 1 username username 4526456 apr 6 18:12 ./.venv/bin/python

but with VIRTUALENV_ALWAYS_COPY doesn't:

VIRTUALENV_ALWAYS_COPY=1 virtualenv .venv -vvv --with-traceback && ls -al ./.venv/bin/python

lrwxrwxrwx 1 username username 16 apr 6 18:12 ./.venv/bin/python -> /usr/bin/python3

Environment

Provide at least:

  • OS: Ubuntu 18.04.4 LTS

  • pip list of the host python where virtualenv is installed:

      Package                      Version            
      ---------------------------- -------------------
      absl-py                      0.9.0              
      aiohttp                      3.6.2              
      aiohttp-socks                0.3.4              
      aiorpcX                      0.18.4             
      appdirs                      1.4.3              
      asn1crypto                   0.24.0             
      astor                        0.8.1              
      async-timeout                3.0.1              
      attrs                        19.3.0             
      backcall                     0.1.0              
      beautifulsoup4               4.6.0              
      bleach                       3.1.0              
      blessings                    1.7                
      bsddb3                       6.1.0              
      cachetools                   4.0.0              
      catfish                      1.4.4              
      certifi                      2019.3.9           
      cffi                         1.12.2             
      chardet                      3.0.4              
      Click                        7.0                
      colorama                     0.4.1              
      command-not-found            0.3                
      construct                    2.10.56            
      cryptography                 2.6.1              
      cupshelpers                  1.0                
      cycler                       0.10.0             
      Cython                       0.29.6             
      decorator                    4.3.2              
      defer                        1.0.6              
      defusedxml                   0.5.0              
      distlib                      0.3.0              
      distro                       1.4.0              
      distro-info                  0.18ubuntu0.18.04.1
      dnspython                    1.16.0             
      ecdsa                        0.15               
      Electrum                     3.3.8              
      entrypoints                  0.3                
      filelock                     3.0.12             
      Flask                        1.0.2              
      gast                         0.2.2              
      gitdb2                       2.0.5              
      GitPython                    2.1.11             
      google-auth                  1.11.1             
      google-auth-oauthlib         0.4.1              
      google-pasta                 0.1.8              
      gpg                          1.10.0             
      gpustat                      0.5.0              
      gramps                       5.1.1              
      grpcio                       1.27.2             
      Guake                        3.6.3              
      h5py                         2.9.0              
      html5lib                     1.0.1              
      httplib2                     0.12.1             
      idna                         2.7                
      idna-ssl                     1.1.0              
      ifaddr                       0.1.6              
      implicit                     0.3.8              
      importlib-metadata           1.5.0              
      importlib-resources          1.4.0              
      ipykernel                    5.1.0              
      ipython                      7.3.0              
      ipython-genutils             0.2.0              
      ipywidgets                   7.4.2              
      itsdangerous                 1.1.0              
      jedi                         0.13.3             
      jeepney                      0.4                
      Jinja2                       2.10               
      jsonrpclib-pelix             0.4.0              
      jsonschema                   3.0.1              
      jupyter                      1.0.0              
      jupyter-client               5.2.4              
      jupyter-console              6.0.0              
      jupyter-core                 4.4.0              
      kaggle                       1.5.3              
      Keras-Applications           1.0.8              
      Keras-Preprocessing          1.1.0              
      keyring                      18.0.0             
      keyrings.alt                 3.1.1              
      kiwisolver                   1.0.1              
      language-selector            0.1                
      launchpadlib                 1.10.6             
      lazr.restfulclient           0.14.2             
      lazr.uri                     1.0.3              
      lightdm-gtk-greeter-settings 1.2.2              
      llvmlite                     0.27.1             
      lxml                         4.2.1              
      Mako                         1.0.7              
      Markdown                     2.6.9              
      MarkupSafe                   1.1.1              
      matplotlib                   3.0.3              
      meld                         3.18.0             
      menulibre                    2.2.0              
      mistune                      0.8.4              
      more-itertools               8.2.0              
      mugshot                      0.4.0              
      multidict                    4.7.5              
      nbconvert                    5.4.1              
      nbdiff                       1.0.3              
      nbdime                       1.0.5              
      nbformat                     4.4.0              
      netifaces                    0.10.9             
      networkx                     1.11               
      notebook                     5.7.6              
      numba                        0.42.1             
      numpy                        1.16.4             
      nvidia-ml-py3                7.352.0            
      oauth                        1.0.1              
      oauthlib                     3.0.1              
      olefile                      0.46               
      onboard                      1.4.1              
      op1repacker                  0.2.2              
      opencv-python                4.1.1.26           
      opt-einsum                   3.1.0              
      packaging                    20.3               
      pandas                       0.24.1             
      pandocfilters                1.4.2              
      parso                        0.3.4              
      patsy                        0.5.1              
      pbr                          5.1.3              
      pexpect                      4.6.0              
      pickleshare                  0.7.5              
      Pillow                       5.4.1              
      pip                          20.0.2             
      pipenv                       2018.11.26         
      pluggy                       0.13.1             
      prometheus-client            0.6.0              
      prompt-toolkit               2.0.9              
      protobuf                     3.11.3             
      psutil                       5.6.1              
      ptyprocess                   0.6.0              
      py                           1.8.1              
      pyaes                        1.6.1              
      pyasn1                       0.4.8              
      pyasn1-modules               0.2.8              
      PyAudio                      0.2.11             
      pycairo                      1.16.2             
      pycparser                    2.19               
      pycrypto                     2.6.1              
      pycups                       1.9.73             
      pycurl                       7.43.0.1           
      pyenchant                    2.0.0              
      Pygments                     2.3.1              
      pygobject                    3.26.1             
      pygraphviz                   1.4rc1             
      pygtkspellcheck              4.0.5              
      PyICU                        2.4.2              
      pyparsing                    2.3.1              
      pyrsistent                   0.14.11            
      PySimpleSOAP                 1.16.2             
      PySocks                      1.6.5              
      pytest                       5.4.1              
      python-apt                   1.6.5+ubuntu0.2    
      python-dateutil              2.8.0              
      python-debian                0.1.34             
      python-debianbts             2.8.2              
      Python-fontconfig            0.5.1              
      python-Levenshtein           0.12.0             
      python-magic                 0.4.16             
      python-miio                  0.4.8              
      python-slugify               3.0.0              
      pytz                         2018.9             
      pyxdg                        0.26               
      PyYAML                       3.13               
      pyzmq                        18.0.1             
      QDarkStyle                   2.6.8              
      qrcode                       6.1                
      qtconsole                    4.4.3              
      reportlab                    3.5.13             
      requests                     2.21.0             
      requests-oauthlib            1.3.0              
      requests-unixsocket          0.1.5              
      rsa                          4.0                
      scikit-learn                 0.20.3             
      scipy                        1.4.1              
      screen-resolution-extra      0.0.0              
      seaborn                      0.9.0              
      SecretStorage                3.1.1              
      Send2Trash                   1.5.0              
      setuptools                   45.2.0             
      sgt-launcher                 0.2.4              
      simplegeneric                0.8.1              
      simplejson                   3.16.0             
      six                          1.12.0             
      smmap2                       2.0.5              
      ssh-import-id                5.7                
      statsmodels                  0.9.0              
      stevedore                    1.30.1             
      svg.path                     3.0                
      systemd-python               234                
      tabulate                     0.8.3              
      tensorboard                  2.1.0              
      tensorflow                   2.1.0              
      tensorflow-estimator         2.1.0              
      termcolor                    1.1.0              
      terminado                    0.8.1              
      testpath                     0.4.2              
      text-unidecode               1.2                
      torbrowser-launcher          0.3.2              
      torch                        1.4.0              
      tornado                      6.0.1              
      tqdm                         4.31.1             
      traitlets                    4.3.2              
      typing-extensions            3.7.4.1            
      ubuntu-drivers-common        0.0.0              
      ufw                          0.36               
      umap-learn                   0.3.7              
      unattended-upgrades          0.1                
      Unidecode                    1.0.23             
      urllib3                      1.24.1             
      virtualenv                   20.0.16            
      virtualenv-clone             0.5.1              
      virtualenvwrapper            4.8.4              
      wadllib                      1.3.3              
      wcwidth                      0.1.7              
      webencodings                 0.5.1              
      Werkzeug                     0.15.2             
      wheel                        0.33.1             
      widgetsnbextension           3.4.2              
      wrapt                        1.11.2             
      xcffib                       0.7.0              
      xkit                         0.0.0              
      yarl                         1.4.2              
      youtube-dl                   2020.1.24          
      zeroconf                     0.24.4             
      zipp                         3.1.0              
      zope.interface               4.6.

Output of the virtual environment creation

Make sure to run the creation with -vvv --with-traceback:

VIRTUALENV_COPIES=1 virtualenv .venv -vvv --with-traceback && ls -al ./.venv/bin/python
34 setup logging to NOTSET [DEBUG report:43]
67 find interpreter for spec PythonSpec(path=/usr/bin/python3) [INFO builtin:44]
67 proposed PythonInfo(spec=CPython3.6.9.final.0-64, exe=/usr/bin/python3, platform=linux, version='3.6.9 (default, Nov  7 2019, 10:44:02) \n[GCC 8.3.0]', encoding_fs_io=utf-8-UTF-8) [INFO builtin:50]
67 accepted PythonInfo(spec=CPython3.6.9.final.0-64, exe=/usr/bin/python3, platform=linux, version='3.6.9 (default, Nov  7 2019, 10:44:02) \n[GCC 8.3.0]', encoding_fs_io=utf-8-UTF-8) [DEBUG builtin:52]
68 filesystem is case-sensitive [DEBUG info:28]
101 create virtual environment via CPython3Posix(dest=/tmp/virt/.venv, clear=False, global=False) [INFO session:52]
101 write /tmp/virt/.venv/pyvenv.cfg [DEBUG pyenv_cfg:34]
101 	home = /usr [DEBUG pyenv_cfg:38]
101 	implementation = CPython [DEBUG pyenv_cfg:38]
101 	version_info = 3.6.9.final.0 [DEBUG pyenv_cfg:38]
101 	virtualenv = 20.0.16 [DEBUG pyenv_cfg:38]
101 	include-system-site-packages = false [DEBUG pyenv_cfg:38]
101 	base-prefix = /usr [DEBUG pyenv_cfg:38]
101 	base-exec-prefix = /usr [DEBUG pyenv_cfg:38]
101 	base-executable = /usr/bin/python3 [DEBUG pyenv_cfg:38]
101 remove file /tmp/virt/.venv/bin/python [DEBUG _sync:34]
102 copy /usr/bin/python3 to /tmp/virt/.venv/bin/python [DEBUG _sync:48]
105 copy /usr/bin/python3 to /tmp/virt/.venv/bin/python3 [DEBUG _sync:48]
108 copy /usr/bin/python3 to /tmp/virt/.venv/bin/python3.6 [DEBUG _sync:48]
110 create virtualenv import hook file /tmp/virt/.venv/lib/python3.6/site-packages/_virtualenv.pth [DEBUG api:76]
110 create /tmp/virt/.venv/lib/python3.6/site-packages/_virtualenv.py [DEBUG api:79]
110 ============================== target debug ============================== [DEBUG session:54]
111 debug via /tmp/virt/.venv/bin/python /home/username/.local/lib/python3.6/site-packages/virtualenv/create/debug.py [DEBUG creator:187]
110 {
  "sys": {
    "executable": "/tmp/virt/.venv/bin/python",
    "_base_executable": null,
    "prefix": "/tmp/virt/.venv",
    "base_prefix": "/usr",
    "real_prefix": null,
    "exec_prefix": "/tmp/virt/.venv",
    "base_exec_prefix": "/usr",
    "path": [
      "/usr/lib/python36.zip",
      "/usr/lib/python3.6",
      "/usr/lib/python3.6/lib-dynload",
      "/tmp/virt/.venv/lib/python3.6/site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "UTF-8"
  },
  "version": "3.6.9 (default, Nov  7 2019, 10:44:02) \n[GCC 8.3.0]",
  "os": "<module 'os' from '/usr/lib/python3.6/os.py'>",
  "site": "<module 'site' from '/usr/lib/python3.6/site.py'>",
  "datetime": "<module 'datetime' from '/usr/lib/python3.6/datetime.py'>",
  "math": "<module 'math' (built-in)>",
  "json": "<module 'json' from '/usr/lib/python3.6/json/__init__.py'>"
} [DEBUG session:55]
133 add seed packages via FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/username/.local/share/virtualenv/seed-app-data/v1.0.1) [INFO session:59]
134 Attempting to acquire lock 139699908152848 on /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels.lock [DEBUG filelock:270]
134 Lock 139699908152848 acquired on /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels.lock [INFO filelock:274]
134 get bundled wheel /home/username/.local/lib/python3.6/site-packages/virtualenv/seed/embed/wheels/pip-20.0.2-py2.py3-none-any.whl [DEBUG acquire:51]
134 get bundled wheel /home/username/.local/lib/python3.6/site-packages/virtualenv/seed/embed/wheels/setuptools-46.1.3-py3-none-any.whl [DEBUG acquire:51]
135 get bundled wheel /home/username/.local/lib/python3.6/site-packages/virtualenv/seed/embed/wheels/wheel-0.34.2-py2.py3-none-any.whl [DEBUG acquire:51]
136 install wheel from wheel /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels/wheel-0.34.2-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
136 install setuptools from wheel /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels/setuptools-46.1.3-py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
136 install pip from wheel /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels/pip-20.0.2-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
137 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel-0.34.2.dist-info to /tmp/virt/.venv/lib/python3.6/site-packages/wheel-0.34.2.dist-info [DEBUG _sync:48]
138 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/pkg_resources to /tmp/virt/.venv/lib/python3.6/site-packages/pkg_resources [DEBUG _sync:48]
140 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel to /tmp/virt/.venv/lib/python3.6/site-packages/wheel [DEBUG _sync:48]
144 copy /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel-0.34.2.virtualenv to /tmp/virt/.venv/lib/python3.6/site-packages/wheel-0.34.2.virtualenv [DEBUG _sync:48]
144 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/setuptools-46.1.3.dist-info to /tmp/virt/.venv/lib/python3.6/site-packages/setuptools-46.1.3.dist-info [DEBUG _sync:48]
145 changing mode of /tmp/virt/.venv/bin/wheel-3.6 to 775 [INFO util:566]
145 changing mode of /tmp/virt/.venv/bin/wheel3 to 775 [INFO util:566]
145 changing mode of /tmp/virt/.venv/bin/wheel to 775 [INFO util:566]
145 generated console scripts wheel-3.6 wheel wheel3 [DEBUG base:53]
148 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/setuptools to /tmp/virt/.venv/lib/python3.6/site-packages/setuptools [DEBUG _sync:48]
150 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip to /tmp/virt/.venv/lib/python3.6/site-packages/pip [DEBUG _sync:48]
158 copy /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/easy_install.py to /tmp/virt/.venv/lib/python3.6/site-packages/easy_install.py [DEBUG _sync:48]
158 copy /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/setuptools-46.1.3.virtualenv to /tmp/virt/.venv/lib/python3.6/site-packages/setuptools-46.1.3.virtualenv [DEBUG _sync:48]
159 changing mode of /tmp/virt/.venv/bin/easy_install3 to 775 [INFO util:566]
159 changing mode of /tmp/virt/.venv/bin/easy_install to 775 [INFO util:566]
159 changing mode of /tmp/virt/.venv/bin/easy_install-3.6 to 775 [INFO util:566]
159 generated console scripts easy_install3 easy_install easy_install-3.6 [DEBUG base:53]
177 copy /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip-20.0.2.virtualenv to /tmp/virt/.venv/lib/python3.6/site-packages/pip-20.0.2.virtualenv [DEBUG _sync:48]
177 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip-20.0.2.dist-info to /tmp/virt/.venv/lib/python3.6/site-packages/pip-20.0.2.dist-info [DEBUG _sync:48]
178 changing mode of /tmp/virt/.venv/bin/pip3 to 775 [INFO util:566]
178 changing mode of /tmp/virt/.venv/bin/pip3.6 to 775 [INFO util:566]
178 changing mode of /tmp/virt/.venv/bin/pip-3.6 to 775 [INFO util:566]
178 changing mode of /tmp/virt/.venv/bin/pip to 775 [INFO util:566]
179 generated console scripts pip3 pip3.6 pip pip-3.6 [DEBUG base:53]
179 Attempting to release lock 139699908152848 on /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels.lock [DEBUG filelock:315]
179 Lock 139699908152848 released on /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels.lock [INFO filelock:318]
179 add activators for Bash, CShell, Fish, PowerShell, Python, Xonsh [INFO session:65]
180 write /tmp/virt/.venv/pyvenv.cfg [DEBUG pyenv_cfg:34]
180 	home = /usr [DEBUG pyenv_cfg:38]
180 	implementation = CPython [DEBUG pyenv_cfg:38]
180 	version_info = 3.6.9.final.0 [DEBUG pyenv_cfg:38]
180 	virtualenv = 20.0.16 [DEBUG pyenv_cfg:38]
180 	include-system-site-packages = false [DEBUG pyenv_cfg:38]
180 	base-prefix = /usr [DEBUG pyenv_cfg:38]
180 	base-exec-prefix = /usr [DEBUG pyenv_cfg:38]
180 	base-executable = /usr/bin/python3 [DEBUG pyenv_cfg:38]
180 created virtual environment CPython3.6.9.final.0-64 in 147ms
  creator CPython3Posix(dest=/tmp/virt/.venv, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/username/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator [WARNING __main__:21]
-rwxr-xr-x 1 username username 4526456 apr  6 18:14 ./.venv/bin/python

VIRTUALENV_ALWAYS_COPY=1 virtualenv .venv -vvv --with-traceback && ls -al ./.venv/bin/python
34 setup logging to NOTSET [DEBUG report:43]
66 find interpreter for spec PythonSpec(path=/usr/bin/python3) [INFO builtin:44]
66 proposed PythonInfo(spec=CPython3.6.9.final.0-64, exe=/usr/bin/python3, platform=linux, version='3.6.9 (default, Nov  7 2019, 10:44:02) \n[GCC 8.3.0]', encoding_fs_io=utf-8-UTF-8) [INFO builtin:50]
66 accepted PythonInfo(spec=CPython3.6.9.final.0-64, exe=/usr/bin/python3, platform=linux, version='3.6.9 (default, Nov  7 2019, 10:44:02) \n[GCC 8.3.0]', encoding_fs_io=utf-8-UTF-8) [DEBUG builtin:52]
67 filesystem is case-sensitive [DEBUG info:28]
99 create virtual environment via CPython3Posix(dest=/tmp/virt/.venv, clear=False, global=False) [INFO session:52]
99 write /tmp/virt/.venv/pyvenv.cfg [DEBUG pyenv_cfg:34]
99 	home = /usr [DEBUG pyenv_cfg:38]
99 	implementation = CPython [DEBUG pyenv_cfg:38]
99 	version_info = 3.6.9.final.0 [DEBUG pyenv_cfg:38]
99 	virtualenv = 20.0.16 [DEBUG pyenv_cfg:38]
99 	include-system-site-packages = false [DEBUG pyenv_cfg:38]
99 	base-prefix = /usr [DEBUG pyenv_cfg:38]
99 	base-exec-prefix = /usr [DEBUG pyenv_cfg:38]
100 	base-executable = /usr/bin/python3 [DEBUG pyenv_cfg:38]
100 remove file /tmp/virt/.venv/bin/python [DEBUG _sync:34]
100 symlink /usr/bin/python3 to /tmp/virt/.venv/bin/python [DEBUG _sync:40]
100 create virtualenv import hook file /tmp/virt/.venv/lib/python3.6/site-packages/_virtualenv.pth [DEBUG api:76]
100 create /tmp/virt/.venv/lib/python3.6/site-packages/_virtualenv.py [DEBUG api:79]
100 ============================== target debug ============================== [DEBUG session:54]
101 debug via /tmp/virt/.venv/bin/python /home/username/.local/lib/python3.6/site-packages/virtualenv/create/debug.py [DEBUG creator:187]
100 {
  "sys": {
    "executable": "/tmp/virt/.venv/bin/python",
    "_base_executable": null,
    "prefix": "/tmp/virt/.venv",
    "base_prefix": "/usr",
    "real_prefix": null,
    "exec_prefix": "/tmp/virt/.venv",
    "base_exec_prefix": "/usr",
    "path": [
      "/usr/lib/python36.zip",
      "/usr/lib/python3.6",
      "/usr/lib/python3.6/lib-dynload",
      "/tmp/virt/.venv/lib/python3.6/site-packages"
    ],
    "meta_path": [
      "<class '_virtualenv._Finder'>",
      "<class '_frozen_importlib.BuiltinImporter'>",
      "<class '_frozen_importlib.FrozenImporter'>",
      "<class '_frozen_importlib_external.PathFinder'>"
    ],
    "fs_encoding": "utf-8",
    "io_encoding": "UTF-8"
  },
  "version": "3.6.9 (default, Nov  7 2019, 10:44:02) \n[GCC 8.3.0]",
  "os": "<module 'os' from '/usr/lib/python3.6/os.py'>",
  "site": "<module 'site' from '/usr/lib/python3.6/site.py'>",
  "datetime": "<module 'datetime' from '/usr/lib/python3.6/datetime.py'>",
  "math": "<module 'math' (built-in)>",
  "json": "<module 'json' from '/usr/lib/python3.6/json/__init__.py'>"
} [DEBUG session:55]
123 add seed packages via FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/username/.local/share/virtualenv/seed-app-data/v1.0.1) [INFO session:59]
123 Attempting to acquire lock 140102569515832 on /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels.lock [DEBUG filelock:270]
123 Lock 140102569515832 acquired on /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels.lock [INFO filelock:274]
124 get bundled wheel /home/username/.local/lib/python3.6/site-packages/virtualenv/seed/embed/wheels/pip-20.0.2-py2.py3-none-any.whl [DEBUG acquire:51]
124 get bundled wheel /home/username/.local/lib/python3.6/site-packages/virtualenv/seed/embed/wheels/setuptools-46.1.3-py3-none-any.whl [DEBUG acquire:51]
124 get bundled wheel /home/username/.local/lib/python3.6/site-packages/virtualenv/seed/embed/wheels/wheel-0.34.2-py2.py3-none-any.whl [DEBUG acquire:51]
126 install wheel from wheel /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels/wheel-0.34.2-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
126 install setuptools from wheel /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels/setuptools-46.1.3-py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
126 install pip from wheel /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels/pip-20.0.2-py2.py3-none-any.whl via CopyPipInstall [DEBUG via_app_data:46]
127 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel-0.34.2.dist-info to /tmp/virt/.venv/lib/python3.6/site-packages/wheel-0.34.2.dist-info [DEBUG _sync:48]
128 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/pkg_resources to /tmp/virt/.venv/lib/python3.6/site-packages/pkg_resources [DEBUG _sync:48]
130 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel to /tmp/virt/.venv/lib/python3.6/site-packages/wheel [DEBUG _sync:48]
134 copy /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/wheel-0.34.2-py2.py3-none-any/wheel-0.34.2.virtualenv to /tmp/virt/.venv/lib/python3.6/site-packages/wheel-0.34.2.virtualenv [DEBUG _sync:48]
135 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/setuptools-46.1.3.dist-info to /tmp/virt/.venv/lib/python3.6/site-packages/setuptools-46.1.3.dist-info [DEBUG _sync:48]
135 changing mode of /tmp/virt/.venv/bin/wheel-3.6 to 775 [INFO util:566]
136 changing mode of /tmp/virt/.venv/bin/wheel3 to 775 [INFO util:566]
136 changing mode of /tmp/virt/.venv/bin/wheel to 775 [INFO util:566]
136 generated console scripts wheel-3.6 wheel3 wheel [DEBUG base:53]
138 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/setuptools to /tmp/virt/.venv/lib/python3.6/site-packages/setuptools [DEBUG _sync:48]
140 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip to /tmp/virt/.venv/lib/python3.6/site-packages/pip [DEBUG _sync:48]
149 copy /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/easy_install.py to /tmp/virt/.venv/lib/python3.6/site-packages/easy_install.py [DEBUG _sync:48]
149 copy /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/setuptools-46.1.3-py3-none-any/setuptools-46.1.3.virtualenv to /tmp/virt/.venv/lib/python3.6/site-packages/setuptools-46.1.3.virtualenv [DEBUG _sync:48]
150 changing mode of /tmp/virt/.venv/bin/easy_install to 775 [INFO util:566]
150 changing mode of /tmp/virt/.venv/bin/easy_install-3.6 to 775 [INFO util:566]
150 changing mode of /tmp/virt/.venv/bin/easy_install3 to 775 [INFO util:566]
150 generated console scripts easy_install easy_install-3.6 easy_install3 [DEBUG base:53]
167 copy /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip-20.0.2.virtualenv to /tmp/virt/.venv/lib/python3.6/site-packages/pip-20.0.2.virtualenv [DEBUG _sync:48]
168 copy directory /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/image/CopyPipInstall/pip-20.0.2-py2.py3-none-any/pip-20.0.2.dist-info to /tmp/virt/.venv/lib/python3.6/site-packages/pip-20.0.2.dist-info [DEBUG _sync:48]
168 changing mode of /tmp/virt/.venv/bin/pip3.6 to 775 [INFO util:566]
168 changing mode of /tmp/virt/.venv/bin/pip to 775 [INFO util:566]
169 changing mode of /tmp/virt/.venv/bin/pip3 to 775 [INFO util:566]
169 changing mode of /tmp/virt/.venv/bin/pip-3.6 to 775 [INFO util:566]
169 generated console scripts pip-3.6 pip3.6 pip pip3 [DEBUG base:53]
169 Attempting to release lock 140102569515832 on /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels.lock [DEBUG filelock:315]
169 Lock 140102569515832 released on /home/username/.local/share/virtualenv/seed-app-data/v1.0.1/3.6/wheels.lock [INFO filelock:318]
169 add activators for Bash, CShell, Fish, PowerShell, Python, Xonsh [INFO session:65]
170 write /tmp/virt/.venv/pyvenv.cfg [DEBUG pyenv_cfg:34]
170 	home = /usr [DEBUG pyenv_cfg:38]
170 	implementation = CPython [DEBUG pyenv_cfg:38]
170 	version_info = 3.6.9.final.0 [DEBUG pyenv_cfg:38]
170 	virtualenv = 20.0.16 [DEBUG pyenv_cfg:38]
170 	include-system-site-packages = false [DEBUG pyenv_cfg:38]
170 	base-prefix = /usr [DEBUG pyenv_cfg:38]
170 	base-exec-prefix = /usr [DEBUG pyenv_cfg:38]
170 	base-executable = /usr/bin/python3 [DEBUG pyenv_cfg:38]
170 created virtual environment CPython3.6.9.final.0-64 in 137ms
  creator CPython3Posix(dest=/tmp/virt/.venv, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/username/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator [WARNING __main__:21]
lrwxrwxrwx 1 username username 16 apr  6 18:20 ./.venv/bin/python -> /usr/bin/python3

@gaborbernat
Copy link
Contributor

This is more a feature request than a bug, though I gather we can do something to make this work.

@lucidyan
Copy link
Author

lucidyan commented Apr 6, 2020

@gaborbernat I have to disagree with your statement. Virtualenv documentation clearly say that I can do it with any argument, without any exclusions:
https://virtualenv.pypa.io/en/latest/cli_interface.html#environment-variables

Also based upon this old comment it can be assume that in past virtualenv works well in this specific case: pypa/pipenv#1929 (comment)

@gaborbernat
Copy link
Contributor

@lucidyan it might have worked with old versions, but we did a new major release with 20.0.0 that dropped some old features. To quote the documentation:

Each command line option has a corresponding environment variables with the name format VIRTUALENV_<UPPER_NAME>.

The way I've written that part (and at least the intent was) that every option will have a, aka one, env var that allows it changing.

@gaborbernat
Copy link
Contributor

That being said put in a candidate PR under #1763 that allows this extended behaviour you'd like here.

@gaborbernat
Copy link
Contributor

@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants