Package: python3 Version: 3.4.1-1 Severity: normal Dear Maintainer,
The Debian python3 (as well as python) packages have a peculiar way of handling Python packages compared to other Linux distributions: it search for them under /usr/local/lib/python3.4/dist-packages and /usr/lib/python3/dist-packages. Understandably, the reason for this is to split python packages provided by the Debian distribution from other, user-installed, Python packages. If we look at how Debian usually handles system libraries at the native level, we find something quite similar: /usr/lib is reserved for packaged libraries, and /usr/local/lib is for user-installed libraries. Looking at /etc/ld.so.conf.d/libc.conf, we notice that /usr/local/lib (libraries built from sources) are in the library search path of the system. When we install a Python package built from source (e.g. from git://git.efficios.com/babeltrace.git) using autoconf 2.69-8 and automake 1:1.14.1-3 for building and installing, the installed packages end up in /usr/local/lib/python3.4/site-packages. Unfortunately, this path, which is the install path used by the python aclocal m4 script in the automake Debian package, is not present in the sys.path lookup path list: python3 Python 3.4.1 (default, Sep 10 2014, 19:15:49) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> print(sys.path) ['', '/usr/lib/python3.4', '/usr/lib/python3.4/plat-x86_64-linux-gnu', '/usr/lib/python3.4/lib-dynload', '/usr/local/lib/python3.4/dist-packages', '/usr/lib/python3/dist-packages'] This breaks Python scripts that attempt to import those Python packages, because they cannot be found in the search path. So AFAIU, we could solve this discrepancy by adding /usr/local/lib/python3.4/site-packages to the sys.path module lookup path used by Python 3. Actually, it is kind of weird that python looks up for a "dist-packages" subdirectory under /usr/local: it seems unlikely that distribution packages will install Python packages under /usr/local. Perhaps renaming /usr/local/lib/python3.4/dist-packages from the module search path into /usr/local/lib/python3.4/site-packages would be the appropriate solution ? Thanks, Mathieu -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (900, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16-2-amd64 (SMP w/4 CPU cores) Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python3 depends on: ii dh-python 1.20140511-1 ii libpython3-stdlib 3.4.1-1 ii python3-minimal 3.4.1-1 ii python3.4 3.4.1-11 python3 recommends no packages. Versions of packages python3 suggests: pn python3-doc <none> pn python3-tk <none> pn python3-venv <none> -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org