default python3 module import paths do not include /usr/local/lib/python3/dist-packages

Bug #1746755 reported by dimi
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
meson (Ubuntu)
Confirmed
Undecided
Unassigned
swig (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In the debian documentation it is said that "The directory /usr/local/lib/python3/site-packages is in the Python 3 runtime module search path."

However, Python3 module import paths (sys.path) do not include /usr/local/lib/python3/dist-packages by default, while this is the path returned by distutils.get_python_lib().

Related links:
https://bugs.python.org/issue10196

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in swig (Ubuntu):
status: New → Confirmed
Revision history for this message
Chris Mayo (chris-mayo) wrote :

Also means Python modules installed using Meson into the path found by:

python.get_install_dir()

won't import.

Worked around with:

sudo rmdir /usr/local/lib/python3.10/dist-packages/
sudo ln -s /usr/local/lib/python3/dist-packages/ /usr/local/lib/python3.10/dist-packages

Revision history for this message
Chris Mayo (chris-mayo) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in meson (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.