5

I have installed a commercial solver package (OCT) for JModelica (python-based) --> When I want to open JModelica via "Ipython" i get the following error message:

Traceback (most recent call last):

  File "C:\OCT-1.0b1\Python27\scripts\ipython-script.py", line 5, in <module>

    from pkg_resources import load_entry_point

  File "C:\OCT-1.0b1\Python27\lib\site-packages\pkg_resources.py", line 2825, in

 <module>

    add_activation_listener(lambda dist: dist.activate())

  File "C:\OCT-1.0b1\Python27\lib\site-packages\pkg_resources.py", line 710, in

subscribe

    callback(dist)

  File "C:\OCT-1.0b1\Python27\lib\site-packages\pkg_resources.py", line 2825, in

 <lambda>

    add_activation_listener(lambda dist: dist.activate())

  File "C:\OCT-1.0b1\Python27\lib\site-packages\pkg_resources.py", line 2260, in

 activate

    map(declare_namespace, self._get_metadata('namespace_packages.txt'))

  File "C:\OCT-1.0b1\Python27\lib\site-packages\pkg_resources.py", line 1836, in

 declare_namespace

    path = sys.modules[parent].__path__

KeyError: 'pyomo'

I work with pyomo via spyder/Anaconda2 (64-bit)

Would be great, if someone could help me!

Bill Hart
  • 359
  • 2
  • 15
AssMero
  • 239
  • 1
  • 5
  • 1
    I tried to uninstall anaconda/Jmodelica (+all python packages) + install both again: everything works. But as soon as i install pyomo (via pip) i get the error message – AssMero Apr 27 '16 at 16:24

1 Answers1

0

You can install pyomo into virtualenv and avoid conflicts with JModelica:

https://software.sandia.gov/downloads/pub/pyomo/PyomoInstallGuide.html#_option_1c_installation_from_pypi_into_a_virtual_environment

denfromufa
  • 5,610
  • 13
  • 81
  • 138