So Ubuntu 24LTS recently came out and it uses Python3.12 as the systemwide python version. Starting from 23, we now cannot really "play" with the default installation: we cannot install python3.12 packages locally with pip. That is ok, it is safer.
I installed python3.11 and I want to use it locally to run my scripts. In this specific case I would prefer to not use virtual environments. For python3.11, I installed packages locally with
python3.11 -m pip install --user --force-reinstall -r requirements.txt
because I would like to not rely on systemwide installations. I simply want to have python3.11 use local packages, without conflicting with Ubuntu python3.12
When I run:
python3.11 -c "import matplotlib.pyplot"
I get this warning:
/home/<user>local/lib/python3.11/site-packages/matplotlib/projections/__init__.py:63: UserWarning: Unable to import Axes3D. This may be due to multiple versions of Matplotlib being installed (e.g. as a system package and as a pip package). As a result, the 3D projection is not available. warnings.warn("Unable to import Axes3D. This may be due to multiple versions of "
I would like to prevent python3.11 to use systemwide packages, without a virtual environment. Is it possible? Would it be easy and advisable, in this case, to permanently remove /usr/lib/python3/dist-packages/
from the python3.11 path?
Thank you very much.