Package: python2.7
Version: 2.7.16-2+deb10u1
Severity: normal


-- System Information:
Debian Release: 10.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.19.0-13-amd64 (SMP w/20 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python2.7 depends on:
ii  libpython2.7-stdlib  2.7.16-2+deb10u1
ii  mime-support         3.62
ii  python2.7-minimal    2.7.16-2+deb10u1

python2.7 recommends no packages.

Versions of packages python2.7 suggests:
ii  binutils       2.31.1-16
pn  python2.7-doc  <none>

-- no debconf information

-- Additional Informations
When you install a python-backports-xxx package, the directory backports
is created in /usr/lib/python2.7/dist-packages. Then, most data of the
package are copied in this directory.
then you can import modules of this package with an "import
backports.xxx"

If at a later time you install using pip a backported module not provided
within a package, for example backports.lzma, with command pip install
backports.lzma, pip create a directory backports in
/usr/local/lib/python2.7/dist-packages.
In this directoty pip copy most of data of this module.

The problem is that this module is impossible to import
import backports.lzma return ImportError: No module named lzma
but, if I look at my sys path I see that
/usr/local/lib/python2.7/dist-packages is in the path
>>> print sys.path
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', 
'/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', 
'/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', 
'/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gtk-2.0', 
'/usr/lib/python2.7/dist-packages/wx-3.0-gtk3']

the only possible workaround I have found is to symlink module
directories in /usr/lib/python2.7/dist-packages as if the module would
have been installed from a Debian package
-- IMPORTANT NOTICE:



The contents of this email and any attachments are confidential and may also be 
privileged. If you are not the intended recipient, please notify the sender 
immediately and do not disclose the contents to any other person, use it for 
any purpose, or store or copy the information in any medium.



Thank you.

Reply via email to