问题
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