Failure to import pyOptSparseDriver

拜拜、爱过 提交于 2019-12-13 03:47:16

问题


I have installed OpenMDAO ver. 1.7.4 & successfully run several tutorial examples. However when issuing the command "from openmdao.api import pyOptSparseDriver" I get the response "ImportError: cannot import name pyOptSparseDriver".

I feel sure that I should be able to import pyOptSparseDriver (& that I have spelled it correctly). I have tried reinstalling OpenMDAO and this seemed to complete without error, but the problem persists.

Could anyone point me in the right direction?

Thanks!


回答1:


Have you installed pyoptsparse itself? That driver is only available after you install the necessary library.



来源:https://stackoverflow.com/questions/50470576/failure-to-import-pyoptsparsedriver

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!