Closed mattip closed 1 year ago
hopefully, it should be as simple as using sys.base_prefix
here instead of sys.prefix
The parallel cpython patch looks for the directory of the python.dll
loaded into the process. For PyPy, since we are doing this in app-level python that translation bakes into the executable, sys.base_prefix
would be easier.
The whole problem is a bit more complicated.
Library\bin
from the conda env, otherwise PyPy cannot start up (it is missing libexpat.dll
, libbz2.dll
, libffi-8.ddl
). I think this is done on CPython with a py.exe launcher.site.py
)Perhaps the first problem should be handled by the activate.bat script, which could modify the PATH
the second point was wrong: there was a bug in the PR that was fixed by a subsequent change (thanks @isuruf). While the new version works, the first point still holds. You can only use the virtualenv while the original conda environment is still activated.
Solution to issue cannot be found in the documentation.
Issue
Using
python -m venv destination
and then running destination\script\python -c "import sqlite3" fails. Turning onset CONDA_DLL_SEARCH_MODIFICATION_DEBUG=1
show why: the paths inside the venv are added instead of the ones from the base pythonEnvironment info