openmdao - 在使用 Openmdao 的 Openaerostruct 中运行示例
问题描述
我已经运行了 Openmdao 和 Openaerostruct 中给出的基本示例,包括演练。但是,“run_aerostruct_uCRM.multipoint .py”示例之一抛出错误:
文件“C:\Users\Narahari\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py”,第 108 行,在 execfile exec(compile(f.read(), filename, 'exec'), namespace)
文件“D:/D_volume_ADE/Aircraft_Design_course/MDO_Aerospace/OpenAeroStruct-master/openaerostruct/examples/run_aerostruct_uCRM_multipoint.py”,第 28 行,从 openmdao.api 导入 IndepVarComp、Problem、ScipyOptimizeDriver、pyOptSparseDriver、SqliteRecorder、ExecComp、SqliteRecorder
ImportError: 无法从 'openmdao.api' 导入名称 'pyOptSparseDriver' (C:\Users\Narahari\Anaconda3\lib\site-packages\openmdao\api.py)
不知道出了什么问题,任何帮助将不胜感激提前感谢Narahari
解决方案
it looks like example requires pyoptsparse to run. You need to install pyoptsparse from here. However, the latest master branch of OpenAeroStruct has updated this example to not require that driver, using the scipy driver instead. So if you pull down the commit #8cee773 or newer you should be able to run it.
推荐阅读
- c++ - 如何制作一个永远运行的线程?
- sql - 使用 ROWID 运行 SQL Oracle 命令时出现问题
- python - 当我切换随机变量 Z(X, Y) 的 X 和 Y 时,为什么线性回归是错误的?
- javascript - 如何在 React Next.js 中对没有库的表进行分页?
- sparql - 带有 ORDER BY 和 GROUP BY 的 SPARQL CONTRUCT 有序列表
- sql - Big Query-如何在 Big Query 中按浏览量、用户每周比较数据
- jmeter - 在非 GUI 模式下运行 jmeter 测试时,不使用属性文件中的属性
- reactjs - 从 graphql useQuery 检索的数据未显示在子组件中,但在 state 和 props 中可用
- java - Eclipse 抛出“由于连接到 Gradle 构建时出错,将 Gradle 项目与工作区同步失败。”
- list - 从选项列表中获取值列表