Start python devices in Astor: path problem

Dear all,

I write you to ask a trivial question. I have a Tango+PyTango installation in a non-standard directory (installed from source under /opt). When I try to start a python device in Astor it fails (can't import module tango or PyTango). The same occurs with archiver (failed to find libhdb++ libraries). I am running Tango 9.2.5a, pytango 9.2.4 on Centos 7.
In python/ipython consolle I am able to import PyTango/tango so the paths seems to be well-defined, e.g. I am able to start the device from the prompt.
In Ubuntu I have added PYTHONPATH (+ LD_LIBRARY_PATH e.g. for hdb++) to /etc/environment or in /etc/bash.bashrc to make Astor find the paths.
In Centos I have tried to use /etc/profile, /etc/bashrc, /etc/security/pam but no way, so I am doing some trivial mistake.
Maybe you can help me to save my work day…

Many thanks,

Simone
****************************************************************
Simone Riggi
INAF, Osservatorio Astrofisico di Catania
Via S. Sofia 78
95123, Catania - Italy
phone: +39 095 7332 extension 282
e-mail: simone.riggi@gmail.com,
sriggi@oact.inaf.it
skype: simone.riggi
****************************************************************
Hi Simone,
for the libraries you may want to to add the relevant paths to /etc/ld.so.conf and run /sbin/ldconfig to update the cache
(also note that some distro use /etc/ld.so.conf.d/ dir to store specific files).
Not sure about Python, at a first sight /etc/profile and /etc/bashrc should make the trick, but that depends also from the distribution. Some store defaults in /etc/defaults directory (I'm not familiar with Centos). Also, running the interpreter in a login shell, or not, can make a difference.
Lorenzo
Hi Simone,

What you want is to have the environment from the Starter device server which will start your device servers correct, not the environment of the Astor process.

In the end, it is the Starter DS running on the host where you want to start your device servers which will start up your device servers. So if LD_LIBRARY_PATH, PYTHONPATH, etc… is correct when the Starter is started, then it should be able to start up your device servers I guess.

Hoping this helps,
Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Hi Lorenzo & Reynald,

many thanks for your suggestions. After reading your comments, I managed to solve the problem by adding PYTHONPATH to the Starter systemd script (it was missing).

Thanks again for your time,

Simone
****************************************************************
Simone Riggi
INAF, Osservatorio Astrofisico di Catania
Via S. Sofia 78
95123, Catania - Italy
phone: +39 095 7332 extension 282
e-mail: simone.riggi@gmail.com,
sriggi@oact.inaf.it
skype: simone.riggi
****************************************************************
 
Register or login to create to post a reply.