Bug#597739: Salome: cannot load module salomeloader

Alain Leufroy alain.leufroy at logilab.fr
Thu Sep 30 15:41:14 UTC 2010


> Hi Adam,
>
> I've worked a little bit on this problem with André.
>
> We see that the problem is about the fact that the Salome python modules
> site in the ``salome/`` directory whereas it is not interpreted as a
> package by python (``salome/__init__.py`` is missing) and all python code
> import these modules directly.
> As a consequence the ``salome/`` directory must be added to the PYTHONPATH
> (as done in runSalome).
>
> But when calling ``salomeloader`` the PYTHONPATH was not modified.
> We found two kinds of solution.
>
> 1. Letting the install as clean as it is and expecting that advanced user
> correctly set the PYTHONPATH:
>
>  ex:
>
>  $ PYTHONPATH=/usr/lib/python2.6/dist-packages/salome/ salomeloader
>
>

I've enclosed a solution without splitting salomeloader into 2 files 
(bash+python) using the ``sys.path`` directly in the initial salomeloader.sh 
(see attached patch).



Cheers,

Alain

--
Alain Leufroy
http://www.logilab.fr/
Informatique scientifique & gestion de connaissances
-------------- next part --------------
A non-text attachment was scrubbed...
Name: salomeloader.patch
Type: text/x-diff
Size: 704 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20100930/8cb7046c/attachment.patch>


More information about the debian-science-maintainers mailing list