Isotropix Forums

Can't get Python to work on linux

Clarisse Scripting related topics

Can't get Python to work on linux

Unread postby varomix » Thu Dec 10, 2015 12:51 am

Hey guys
I can't seem to make python to work, I'm on linux mint
I get this errors
00:00:05 Traceback (most recent call last):
00:00:05 File "<string>", line 1, in <module>
00:00:05 AttributeError: 'module' object has no attribute 'AppBase'
00:00:05 Traceback (most recent call last):
00:00:05 File "<string>", line 2, in <module>
00:00:05 AttributeError: 'module' object has no attribute 'PyEventObjectHandler'
00:00:05 Traceback (most recent call last):
00:00:05 File "<string>", line 2, in <module>
00:00:05 AttributeError: 'module' object has no attribute 'PyGuiGarbageCollector'
00:00:05 Traceback (most recent call last):
00:00:05 File "<string>", line 1, in <module>
00:00:05 NameError: name '__ix_session_event_object_handler__' is not defined
00:00:05 Traceback (most recent call last):
00:00:05 File "<string>", line 1, in <module>
00:00:05 NameError: name '__ix_session_gui_garbage_collector__' is not defined
00:00:05


This is my clarisse.env
PYTHONHOME=/usr/lib/python2.7
PYTHONPATH=/home/varomix/bin/isotropix_clarisse_ifx_2.0_sp6_linux64/clarisse/python:/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:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload

seems like I'm missing something
Thanks for the help
varomix
 
Posts: 5
Joined: Sat Jan 26, 2013 12:33 am

Re: Can't get Python to work on linux

Unread postby varomix » Mon Dec 14, 2015 10:54 pm

Hi

I solved this had to do a few things

Clarisse wants to load the 2.6 python library so I cheated
error: libpython2.6.so.1.0: cannot open shared object file: No such file or directory

By doing this
Code: Select all
sudo ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 /usr/lib/libpython2.6.so.1.0


once that works and you have the correct env settings, se below
you need to fix this error
ImportError: No module named site

A know bug in Ubuntu based distros
Code: Select all
sudo ln -s /usr/lib/python2.7/plat-*/_sysconfigdata_nd.py /usr/lib/python2.7/


This still might give you the SITE error or that the PYTHONHOME and PYTHONPATH are not set or something
so for Clarisse to just use what ever is set in the clarisse.env file we clear any previous variables
I edited the clarisse launch script directly and added this just below #!/bin/bash
unset PYTHONHOME
unset PYTHONPATH


clarisse.env this is the file here >> /home/username/.isotropix/clarisse.env
PYTHONHOME=/usr/lib/python2.7
PYTHONPATH=/home/varomix/bin/isotropix_clarisse_ifx_2.0_sp6_linux64/clarisse/python:/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:/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


and now it works great

if anyone else needs help let me know

Cheers!!
varomix
 
Posts: 5
Joined: Sat Jan 26, 2013 12:33 am

Re: Can't get Python to work on linux

Unread postby julien » Tue Dec 15, 2015 11:50 am

Hi,
Clarisse 2.0 wants python 2.6 so you did the right thing if you only have the 2.7 version installed, since its compatible.

I think your PYTHONHOME is not right since it points to a lib folder and PYTHONHOME is about python executable binary. Since Clarisse does not use python executable directly but only libraries it does not shows up.

Have a good day!

Regards
User avatar
julien
 
Posts: 270
Joined: Mon Nov 18, 2013 7:30 pm

Re: Can't get Python to work on linux

Unread postby linuxmarc » Sat Apr 15, 2017 10:03 pm

Trying to run Clarisse 3 SP9 PLE on my Ubuntu 16.04
First I got the missing
Code: Select all
 libpython2.7.so
error, so I made a symlink in
Code: Select all
/usr/lib/x86_64-linux-gnu
to
Code: Select all
libpython2.7.so.1.0


Now everytime I try to start clarisse, shortly after the splash, I get: 
Code: Select all
ImportError: No module named site


Tried all the things mentioned above, but still not able to start and try clarisse.
Is there any fix? I'd love to test this.... :)
linuxmarc
 
Posts: 2
Joined: Sat Apr 15, 2017 9:55 pm

Re: Can't get Python to work on linux

Unread postby julien » Tue Apr 18, 2017 11:54 am

Hi,
I have it working on a regular Ubuntu 16.04 with this PYTHONPATH value in clarisse.env:
Code: Select all
PYTHONPATH=/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


Regards
User avatar
julien
 
Posts: 270
Joined: Mon Nov 18, 2013 7:30 pm

Re: Can't get Python to work on linux

Unread postby linuxmarc » Sat Apr 22, 2017 4:39 pm

Thanks!

Your solution worked perfect!
linuxmarc
 
Posts: 2
Joined: Sat Apr 15, 2017 9:55 pm


Return to Scripting