conda support - Windows 3.7+ · Issue #1986 · pypa/virtualenv (original) (raw)

We don't have official conda support, but things kinda worked. This is no longer the case post #1976. Seems conda copies the venv module into its environments, and it's a version without the redirector script on Python3.7+.

❯ lsd --tree C:\Users\traveler\miniconda3\envs\virtualenv\Lib\venv\
 venv
├──  __init__.py
├──  __main__.py
├──  __pycache__
│  ├──  __init__.cpython-38.pyc
│  └──  __main__.cpython-38.pyc
└──  scripts
   ├──  common
   │  ├──  activate
   │  └──  Activate.ps1
   ├──  nt
   │  ├──  activate.bat
   │  └──  deactivate.bat
   └──  posix
      ├──  activate.csh
      └──  activate.fish

The part that differs from the core CPython:

❯ lsd --tree C:\\Users\\traveler\\AppData\\Local\\Programs\\Python\\Python38\\lib\\venv
 venv
├──  __init__.py
...
   ├──  nt
   │  ├──  activate.bat
   │  ├──  deactivate.bat
   │  ├──  python.exe
   │  └──  pythonw.exe
...

So users fail with:

(virtualenv) PS C:\Users\traveler> virtualenv --clear venv
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\users\\traveler\\miniconda3\\envs\\virtualenv\\Lib\\venv\\scripts\\nt\\python.exe'

We should run tests with conda too, and support it though. Then we should update https://virtualenv.pypa.io/en/latest/installation.html#python-and-os-compatibility