I come back to this issue and I reopen the discussion because I am afraid the problem has nothing to do with the fact I am using a specific pydim package, but with the fact I cannot export any environment in Ignition. The same problem I had with pydim I reproduce it with any other python module not installed in the default area. So I have taken a very simple pymodule: pytz, which only has dependencies with python itself. In my Linux machine, I built it, I installed it and just after I open the python console:
Python 2.7.5 (default, Apr 2 2020, 13:16:51)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
Perfect, from my linux machine, the module is perfectly found. Now I try the same from the Designer: Tools–> Script console. And here it cannot find the module (just check the screenshot I am attaching).
– 2nd try: Same code from a gateway script, same result. Module not found
– 3rd try: Export of the PYTHONPATH variable from a local file and source from /etc/init.d/ignition under:
List of files to source prior to executing any commands. Use ‘;’ as delimiter.
FILES_TO_SOURCE=" /home/user/ .bashrc;anotherfile;…/file3"
FILES_TO_SOURCE=" /home/pmendez/ .bash_ignition"
and ignition service restarted. Same result, module not found.
So I am wondering how can I export the PYTHONPATH variable and any other Env variable from any code included in Ignition, because this is a basic and daily coding operation and the exporting of the external modules and the exporting of the environment should be a very easy operation within Ignition.
Thanks a lot