当前位置:网站首页>Tips -- solve the problem of no module named matlab.engine
Tips -- solve the problem of no module named matlab.engine
2022-07-28 17:58:00 【A bone loving cat】
1. Problem description
Use matlab Signal processing is a very comfortable thing , But if we want to use python To call MATLAB The result is not happy ?python It's really called MATLAB The library of , That's it matlab.engine modular , But it will appear when used “No module named 'matlab.engine” The problem of :
This is because matlab The question of support , frequently-used matlab The version corresponds to python The version number is :
- Matlab 2016a The highest support python 3.4
- Matlab 2016b,2017a The highest support python 3.5
- Matlab 2017b The highest support python 3.6
- The rest MATLAB Supported by python The version can be installed in the software installation path ( Take my path )
G:\Program Files\MATLAB\R2017b\extern\engines\python
Medium “setup.py” You can see in the file :
Above, MATLAB 2017b Of setup file , It supports python2.7, 3.4, 3.5, 3.6 edition
2. resolvent
- First of all, make sure that MATLAB Whether the version supports the python edition , If not , Suitable can be installed matlab edition , Or change python Version of .
matlab All versions of the cracked version can be found online , Here we use anaconda As an example to demonstrate how to replace python edition :
The first step is to create a new virtual environment , With python3.6 For example
conda create -n py36 python=3.6
Enter the virtual environment :
activate py36
download nb_conda To give jupyter notebook use
conda install nb_conda
such python3.6 The basic environment will be built , The rest is to install some packages you need
- If MATLAB Version support used python edition , You need to do something to MATLAB And python Just go “ binding ”
First step :“win+R” Input “cmd” Open the command line :
The second step : Change the path to MATLAB The installation path , namely “setup.py” The path of the file :
The third step : Open up our python Environmental Science , Here we take the newly established py36 For example :
Step four : Enter the following commands in turn :
python setup.py build --build-base="builddir" install
python setup.py install --prefix="installdir"
python setup.py build --build-base="builddir" install --prefix="installdir"
python setup.py install --user
And then it's done , We can test it , Find out “matlab.engine” Loading successful :
边栏推荐
- Openmv (IV) -- STM32 to realize feature detection
- IO的操作
- Leetcode systematic question brushing (II) -- greed, backtracking, recursion
- centos8按照docker官网创wordpress+mysql报错解决
- Flutter:异常处理
- Electrotechnics Volume II self study notes 1.23
- [p5.js learning notes] mouse interaction event
- 1.4-dos
- “3·8女王节”限时大促竟让场观、视频号销量翻倍?
- Openmv (VI) -- STM32 realizes object recognition and handwritten digit recognition
猜你喜欢

数字滤波器(三)--模拟滤波器的设计

PS fast making full screen watermark

内部类、常用类
![[advanced C language] - analyze the storage of micro data in memory [i]](/img/6a/ac723cee2543cd2403a7e58d556c8e.png)
[advanced C language] - analyze the storage of micro data in memory [i]

Flutter:异常处理

Openmv (I) -- basic introduction and hardware architecture

Openmv (VI) -- STM32 realizes object recognition and handwritten digit recognition

OpenMV(六)--STM32实现物体识别与手写数字识别

On the non recursive and recursive implementation of finding the nth Fibonacci number respectively

OpenMV(一)--基础介绍与硬件架构
随机推荐
Use of multithreading
mmdetection3D---(1)
Tips--SCI论文写作中的小技巧
1.1-注释
OpenMV(二)--IDE安装与固件下载
Tensorflow2.0 (XI) -- understanding LSTM network
数字滤波器(二)--最小相位延时系统和全通系统
横向listview的最佳实现——RecycleView
The solution to the problem that the computer cannot be charged
Point cloud processing - KD tree
TensorFlow2.0(十二)--实现简单RNN与LSTM网络
IO的操作
[C language note sharing] character function and string function (recommended Collection)
Collection collection
3.2- random numbers
webview里面$(document).width()都是一个值
[p5.js learning notes] local variable (let) and global variable (VaR) declaration
[C language note sharing] - dynamic memory management malloc, free, calloc, realloc, flexible array
封装、继承、多态
概率函数P(x)、概率分布函数F(x)与概率密度函数f(x)的区别