﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5271	Cannot import to Python	asnaumoff@…	Alachew Mengist	"Hi!

I use Mac OS Mojave and python 3.6.8. 

Cannot create OMCSessionZMQ. I installed OM 1.13 and ompython via

{{{
python -m pip install -U https://github.com/OpenModelica/OMPython/archive/master.zip
}}}

I get the following error:

{{{
from OMPython import OMCSessionZMQ
omc = OMCSessionZMQ()
}}}


{{{
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-1-f44c8e4c7a10> in <module>
      1 from OMPython import OMCSessionZMQ
----> 2 omc = OMCSessionZMQ()

~/tensorflow/lib/python3.6/site-packages/OMPython/__init__.py in __init__(self, readonly, timeout)
    531 
    532     def __init__(self, readonly=False, timeout = 0.25):
--> 533         OMCSessionHelper.__init__(self)
    534         OMCSessionBase.__init__(self, readonly)
    535         self._create_omc_log_file(""port"")

~/tensorflow/lib/python3.6/site-packages/OMPython/__init__.py in __init__(self)
    115       path_to_omc = spawn.find_executable(""omc"")
    116       if path_to_omc is None:
--> 117         raise ValueError(""Cannot find OpenModelica executable, please install from openmodelica.org"")
    118       self.omhome = os.path.split(os.path.split(os.path.realpath(path_to_omc))[0])[0]
    119   def _get_omc_path(self):

ValueError: Cannot find OpenModelica executable, please install from openmodelica.org
}}}



{{{
os.environ.get('OPENMODELICAHOME')
}}} says nothing :(
"	defect	closed	high		OMPython		worksforme		
