FS#43481 - python-dbus and python2 don't get along (breaks calibre, for one example)

Attached to Project: Arch Linux
Opened by David Kowis (BeepDog) - Friday, 16 January 2015, 23:22 GMT
Last edited by Felix Yan (felixonmars) - Saturday, 17 January 2015, 03:35 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Calibre depends on python2-dbus, and with python-dbus (the python3 version) installed, for some reason, python2 grabs the python3 site libs.
Here's calibre barfing:
https://gist.github.com/dkowis/98b71f8b97ea5a332ef3

You can run python2, and import the DBusGMainLoop and get the exact same error, I just found it when firing up calibre.


Additional info:
All python stuff installed at the time: https://gist.github.com/dkowis/c615474b3fad37d8f383
The relevant ones are:
local/python-dbus 1.2.0-4
local/python2 2.7.9-1
local/python2-dbus 1.2.0-4

* config and/or log files etc.
None necessary


Steps to reproduce:
1. install python2
2. install python2-dbus
3. import DBusGMainLoop
4. Expect success
5. install python-dbus
6. import DBusGMainLoop
7. get python2 trying to load python3 libraries
8. :(
This task depends upon

Closed by  Felix Yan (felixonmars)
Saturday, 17 January 2015, 03:35 GMT
Reason for closing:  Not a bug
Comment by Felix Yan (felixonmars) - Saturday, 17 January 2015, 02:50 GMT
I cannot reproduce the problem. Also I have tried to install calibre, and it runs fine here.

What's your output for the following command?

python2 -c "import sys; print(sys.path)"
Comment by David Kowis (BeepDog) - Saturday, 17 January 2015, 03:31 GMT
dkowis  raziel  ~  $  python2 -c "import sys; print(sys.path)"
['', '/usr/lib/python3.4/site-packages', '/usr/lib/python27.zip', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/lib/python2.7/site-packages', '/usr/lib/python2.7/site-packages/gtk-2.0']


That would certainly do it. Where does it get that info from?
Comment by David Kowis (BeepDog) - Saturday, 17 January 2015, 03:33 GMT
dkowis  raziel  ~  $  echo $PYTHONPATH
/usr/lib/python3.4/site-packages

O snap, I may have just figured this out. Now I need to find what's setting PYTHONPATH for me.

So this is probably not a bug, it's my problem! Derp!

Loading...