Mixed packages from Salome and Python
Hi all,
I am a new user of Salome but I am familiar with Python. There are a lot of new packages I found while using Salome (Geompy, Smesh...) but they are not recognized by PythonShell (IDLE). Similarly, packages installed in Python (example geopy...) are not recognized in Salome. Hence, I was wondering if there is a possibility for Salome and/or Python to recognize the other's installed packages, if so I'd be very pleased to know.
Kind regards
The Salome install also install its own python distribution. So to install a package in Salome you will have to source the environment and then install the desired package. easy_install is probably the easiest way
Previously pete Halverson wrote:
The Salome install also install its own python distribution. So to install a package in Salome you will have to source the environment and then install the desired package. easy_install is probably the easiest way
Hello Pete,
Could you explain what you mean by source the environment to a middle level person like me. I know the term source ( or .) and environment variables, but which Salome - centric environment variables need to be appended to make easy_install install them such that Salome can find them?
I installed easy_install in Ubuntu using:
sudo aptitude install python-setuptools
then I used:
sudo easy_install geopy
as an example and I am able to "import geopy" within idle, but my question is how I make Salome python console recognize 'import geopy'? I know one can set "export PYTHONPATH=/home/username/bin" for example to allow import of user written modules that reside in /home/username/bin before starting idle. Would it be the same for Salome? Thanks for any advice you can provide.
Regards,
JMB
