Sujet : Re: Pip installs to unexpected place
De : bowman (at) *nospam* montana.com (rbowman)
Groupes : comp.lang.pythonDate : 15. Apr 2025, 19:15:22
Autres entêtes
Message-ID : <m67m1pFgkilU3@mid.individual.net>
References : 1 2 3
User-Agent : Pan/0.160 (Toresk; )
On Tue, 15 Apr 2025 18:43:43 +0200, Friedrich Romstedt wrote:
Many people put emphasis on that you need to *activate* a virtualenv
before using it, but no-one so far stressed the fact that you got Sphinx
installed to ~/jonathan/.local/lib/python3.13/site-packages *without
using *--user.
This may depend on the OS. On Ubuntu 24.10 with python 3.12.7 I get
$ pip install black
error: externally-managed-environment
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
I do have '/home/rbowman/.local/lib/python3.10/site-packages' left over
from earlier versions of Ubuntu.
However on Fedora 42 with 3.13.2
Defaulting to user installation because normal site-packages is not
writable.