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==20.0.34 not compatible with python on windows #12094

Open
drewgilliam opened this issue Oct 14, 2020 · 7 comments
Open

virtualenv==20.0.34 not compatible with python on windows #12094

drewgilliam opened this issue Oct 14, 2020 · 7 comments

Comments

@drewgilliam
Copy link

Actual Behavior

virtualenv v20.0.34 fails on windows with anaconda python. virtualenv v20.0.34 introduced a requirement that python have the file <PYTHON_DIR>/Lib/venv/scripts/nt/python.exe. Anaconda python packages do not have this file.

Traceback

FileNotFoundError: [Errno 2] No such file or directory: 'C:\\<redacted>\\python-3.7.9\\Lib\\venv\\scripts\\nt\\python.exe'

Related issue

#10822

Virtualenv PRs that introduced the issue

pypa/virtualenv#1976
pypa/virtualenv#1977

Virtualenv line throwing error

https://github.com/gaborbernat/virtualenv/blob/main/src/virtualenv/create/via_global_ref/builtin/cpython/cpython3.py#L71

Expected Behavior

anaconda python & virtualenv==20.0.34 should be compatible.

Steps to Reproduce

On windows, create a conda environment with python and virtualenv==20.0.34, then try to create a virtualenv

conda create -n foo python virtualenv==20.0.34
conda activate foo
virtualenv ./bar
Anaconda or Miniconda version:

64-bit Miniconda3
https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
1f4ff67f051c815b6008f144fdc4c3092af2805301d248b56281c36c1f4333e5

Operating System:

Windows 10 64-bit

conda info
     active environment : None
       user config file : C:\Users\drew\.condarc
 populated config files :
          conda version : 4.8.3
    conda-build version : not installed
         python version : 3.8.2.final.0
       virtual packages :
       base environment : C:\Users\drew\AppData\Local\Temp\_MEI454682  (read only)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\drew\AppData\Local\Temp\_MEI454682\pkgs
                          C:\Users\drew\.conda\pkgs
                          C:\Users\drew\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\drew\.conda\envs
                          C:\Users\drew\AppData\Local\Temp\_MEI454682\envs
                          C:\Users\drew\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.8.3 requests/2.23.0 CPython/3.8.2 Windows/10 Windows/10.0.18362
          administrator : False
             netrc file : None
           offline mode : False

conda list --show-channel-urls
# packages in environment at C:\<redacted>\python-3.7.9:
#
# Name                    Version                   Build  Channel
appdirs                   1.4.4                      py_0    defaults
brotlipy                  0.7.0           py37he774522_1000    defaults
ca-certificates           2020.10.14                    0    defaults
certifi                   2020.6.20                py37_0    defaults
cffi                      1.14.3           py37h7a1dbc1_0    defaults
chardet                   3.0.4                 py37_1003    defaults
cryptography              3.1.1            py37h7a1dbc1_0    defaults
distlib                   0.3.1                    py37_0    defaults
filelock                  3.0.12                     py_0    defaults
idna                      2.10                       py_0    defaults
importlib-metadata        2.0.0                      py_1    defaults
openssl                   1.1.1h               he774522_0    defaults
pip                       20.2.3                   py37_0    defaults
pycparser                 2.20                       py_2    defaults
pyopenssl                 19.1.0                     py_1    defaults
pysocks                   1.7.1                    py37_1    defaults
python                    3.7.9                h60c2a47_0    defaults
requests                  2.24.0                     py_0    defaults
setuptools                50.3.0           py37h9490d1a_1    defaults
six                       1.15.0                     py_0    defaults
sqlite                    3.33.0               h2a8f88b_0    defaults
urllib3                   1.25.10                    py_0    defaults
vc                        14.1                 h0510ff6_4    defaults
virtualenv                20.0.34                  py37_0    defaults
vs2015_runtime            14.16.27012          hf0eaf9b_3    defaults
wheel                     0.35.1                     py_0    defaults
win_inet_pton             1.1.0                    py37_0    defaults
wincertstore              0.2                      py37_0    defaults
zipp                      3.3.0                      py_0    defaults
zlib                      1.2.11               h62dcd97_4    defaults

@PhilReinhold
Copy link

I also ran into this, since it breaks pre-commit. I can confirm that downgrading to virtualenv=20.0.33 removes the issue.

@jphme
Copy link

jphme commented Oct 18, 2020

ran into the same issue, see my post here:

_Originally posted by @jpdus in #10822 (comment)

@drewgilliam
Copy link
Author

virtualenv issue to officially support conda due to this problem.
pypa/virtualenv#1986

@gaborbernat
Copy link

Does anyone know why conda does not follow CPython on the venv creation? Why is custom patched?

@whg517
Copy link

whg517 commented Nov 19, 2020

Does anybody know what's going on with this question? I used 'Pipenv' in my development, which relies on 'Virtualenv', and now I can't use it properly in my new environment, which annoys me.

LexSong added a commit to LexSong/dotfiles that referenced this issue Nov 30, 2020
Also, virtualenv==20.0.34 is not compatible with conda on Windows

See:
ContinuumIO/anaconda-issues#12094
pypa/virtualenv#1986
LexSong added a commit to LexSong/dotfiles that referenced this issue Dec 1, 2020
virtualenv==20.0.34 is not compatible with conda on Windows

See:
ContinuumIO/anaconda-issues#12094
pypa/virtualenv#1986
LexSong added a commit to LexSong/dotfiles that referenced this issue Dec 2, 2020
virtualenv==20.0.34 is not compatible with conda on Windows

See:
ContinuumIO/anaconda-issues#12094
pypa/virtualenv#1986
LexSong added a commit to LexSong/dotfiles that referenced this issue Dec 23, 2020
virtualenv==20.0.34 is not compatible with conda on Windows

See:
ContinuumIO/anaconda-issues#12094
pypa/virtualenv#1986
@bharath5673
Copy link

I also ran into this, since it breaks pre-commit. I can confirm that downgrading to virtualenv=20.0.33 removes the issue.

tysm... i was facing the same issue while installing ESP-IDF on windows 10... downgraing venv got fixd ))

PMARINA added a commit to PMARINA/CS555 that referenced this issue Oct 3, 2021
- Shouldn't have created the file automatically (as the documentation specified)
- VENV is pinned as the newer version causes issues with pre-commit
  - See [this](ContinuumIO/anaconda-issues#12094 (comment)) for more info
@dmyersturnbull
Copy link

FYI: Starting tomorrow, Conda will be broken on Windows for every maintained version of Python. (This will hold true for any virtualenv released in the last 3 years.)

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

No branches or pull requests

7 participants