Virtual environments created with venv --system-site-packages
can't access binaries from pre-installed packages, neither re-install those packages
#118388
Labels
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
I wanted to "pre-install" in my "source" python installation some packages I often use, so that those packages are readily available in the virtual environments created from this "source", without wasting space and time re-installing them every time I create a new venv.
I thought the
--system-site-packages
would do just that, however, this "doesn't work" for binaries installed by python packages (for instance, ipython, but I can think of other cases like pylint, flake8 or cookieninja):I create the venv (using a locally compiled 3.11 version):
However, the bin directory of the venv does not contain ipython:
But ipython is installed in the source python 3.11:
This is however not in the PATH when in the venv (in this particular case, calling
ipython
starts one installed with python 3.6 in${HOME}/bin
, whereas if I try with a package not installed anywhere else than in the python 3.11 install, like cookieninja, the command is not found).This even prevents the installation of ipython in the venv:
CPython versions tested on:
3.11
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: