0

I installed exaile from tar ball.

Exaile ver: 3.4.5 OS : ubuntu 16.04

Its not launching the app while click on icon. I executed exaile command in terminal and it shows the below error.

File "/usr/lib/python3.5/site.py", line 182
file=sys.stderr)
    ^
KIRAN K J
  • 201

1 Answers1

0

As answered in Getting a syntax error when I type pthon on Ubuntu 18.04, the issue is likely due to one application (exaile here) expecting python 2, and you having python 3 as the default.

In particular, check sys.path. It likely points to python 3.5, i.e., it includes /usr/lib/python3.5/site.py. As per official documentation, sys.path is a list built from PYTHONPATH and other installation-dependent paths.

As a quick check, find if you have any python 2 in your system ($ python2 --version). If so, find where is the corresponding site.py located, most likely /usr/lib/python2.7/site.py. Then,

$ export PYTHONPATH=/usr/lib/python2.7/site.py
$ exaile

If this works, then for a definitive setup you would have to find a way to change your sys.path when executing exaile.

There are quite a few options, depending if you launch it via command line or a launcher. For instance, you could write a script that exports with export PYTHONPATH="/usr/lib/python2.7/site.py:${PATH}" and then executes whatever you need. That can also be the target of your launcher.

PS: Note also the best way to add to PYTHONPATH