Repository navigation
Open
Description
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
Virtualenv PRs that introduced the issue
pypa/virtualenv#1976
pypa/virtualenv#1977
Virtualenv line throwing error
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
Details
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
Details
# 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
Reacted by Andy Neff, Shane Kimble and Student
Metadata
Metadata
Assignees
Labels
No labels
Activity
PhilReinhold commentedon Oct 14, 2020
I also ran into this, since it breaks pre-commit. I can confirm that downgrading to virtualenv=20.0.33 removes the issue.
jphme commentedon Oct 18, 2020
ran into the same issue, see my post here:
_Originally posted by @jpdus in #10822 (comment)
drewgilliam commentedon Oct 19, 2020
virtualenv issue to officially support conda due to this problem.
pypa/virtualenv#1986
gaborbernat commentedon Oct 20, 2020
Does anyone know why conda does not follow CPython on the venv creation? Why is custom patched?
whg517 commentedon 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.
bharath5673 commentedon Jan 8, 2021
tysm... i was facing the same issue while installing ESP-IDF on windows 10... downgraing venv got fixd ))
[BUG] Fix environment.yml
dmyersturnbull commentedon Jun 26, 2023
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.)