我已经为JModelica(基于python)安装了商业解算器包(OCT) - >当我想通过“Ipython”打开JModelica时,我收到以下错误消息:
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'
我通过spyder / Anaconda2(64位)与pyomo合作
如果有人可以帮助我,那会很棒!
答案 0 :(得分:0)
您可以将pyomo安装到virtualenv中并避免与JModelica发生冲突: