在添加了

import matlab

import matlab.engine出现如下错误:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

经过python console测试到,上述的两个import语句其实都没有产生问题。

后来发现,我的上述两句import语句,位于.py文件的import文件的末尾,所以出现题目中的报错问题,如下图:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

解决方案,把两个import语句挪动到上面去,就可以解决,如下图所示:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

相关文章:

  • 2022-12-23
  • 2021-12-20
  • 2021-04-28
  • 2022-02-11
  • 2022-12-23
  • 2022-01-30
  • 2022-12-23
  • 2021-07-10
猜你喜欢
  • 2021-12-01
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2022-12-23
相关资源
相似解决方案