You are not logged in.

#1 2014-10-22 23:02:35

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

[SOLVED] Meld won't start, how to set $PYTHOPATH correcly?

Since some weeks meld stopped starting on my two computers, the issue (I think) is that python can't find the python 2.x packages.

$ meld
** (meld:3168): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Traceback (most recent call last):
  File "/usr/bin/meld", line 226, in <module>
    import meld.meldapp
  File "/usr/lib/python2.7/site-packages/meld/meldapp.py", line 31, in <module>
    import meld.ui.util
  File "/usr/lib/python2.7/site-packages/meld/ui/util.py", line 23, in <module>
    from meld.ui import gladesupport
  File "/usr/lib/python2.7/site-packages/meld/ui/gladesupport.py", line 3, in <module>
    from meld import diffmap
  File "/usr/lib/python2.7/site-packages/meld/diffmap.py", line 19, in <module>
    import cairo
  File "/usr/lib/python3.4/site-packages/cairo/__init__.py", line 18, in <module>
    from ._cairo import *
ImportError: No module named _cairo

But this works:

$ PYTHONPATH=/usr/lib/python2.7 meld

This is how my PYTHONPATH is set now (in /etc/profile):

$ echo $PYTHONPATH
/usr/lib/python3.4/site-packages

What is the right way to set this variable to work for both python3 and python2?
Is what stopped meld from working in a recent upgrade a bug, or just my system's config gone bad?

Last edited by JKAbrams (2014-10-23 14:46:10)

Offline

#2 2014-10-23 14:44:57

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: [SOLVED] Meld won't start, how to set $PYTHOPATH correcly?

The solution is to not set PYTHONPATH in /etc/profile at all!
This makes it work with both python2 and python3 applications.
When I try setting it, I only get either python2 or python3 applications working.

Offline

#3 2017-11-29 09:22:22

fyloukira
Member
Registered: 2015-10-22
Posts: 10

Re: [SOLVED] Meld won't start, how to set $PYTHOPATH correcly?

I had this problem yesterday. It appears because on my computer,  python is a link to python 2 instead of python 3. I solve it with :

 sudo ln -sf /bin/python3.6 /bin/python 

Offline

#4 2017-11-29 09:31:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,403

Re: [SOLVED] Meld won't start, how to set $PYTHOPATH correcly?

You are doing/have done something very wrong if that symlink wasn't there already.

Thait said, this is no reason to necrobump  a 3 year old solved thread. - https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.

Offline

Board footer

Powered by FluxBB