So I just installed JModelica and with this Python 2.7 is included. When I use the IPython-console and try to import the following (it works):
from pymodelica import compile_fmu
However when I write this in the Python Shell program it says:
Traceback (most recent call last): File "", line 1, in from pymodelica import compile_fmu ImportError: No module named pymodelica****
What is the problem here? I want to use the Python Shell since you can write scripts there.
Regards, Jasir
The problem is that Python needs to know the paths to where JModelica store the Python package "pymodelica". If you use the IPython from the installation of JModelica, this automatically sets the correct paths. The same goes with the regular Python shell, if you use the link from the installation of JModelica, it should work while if you use the Python shell directly from your Python installation, it will not work.