Install Matlab engine in Anaconda Python (Linux)(在 Anaconda Python (Linux) 中安装 Matlab 引擎)
问题描述
我正在尝试使用 anaconda python 3.4 在 CentOS 7 上为 Matlab R2016a 安装 Matlab Engine for Python
.
I'm trying to install Matlab Engine for Python
on CentOS 7 for Matlab R2016a using anaconda python 3.4.
我执行了以下命令:
source activate py34 # Default is python 3.5
python setup.py install
输出是:
running install
running build
running build_py
running install_lib
creating /root/.local/lib/python2.7/site-packages/matlab
creating /root/.local/lib/python2.7/site-packages/matlab/_internal
copying build/lib/matlab/_internal/mlarray_sequence.py -> /root/.local/lib/python2.7/site-packages/matlab/_internal
copying build/lib/matlab/_internal/__init__.py -> /root/.local/lib/python2.7/site-packages/matlab/_internal
copying build/lib/matlab/_internal/mlarray_utils.py -> /root/.local/lib/python2.7/site-packages/matlab/_internal
copying build/lib/matlab/mlarray.py -> /root/.local/lib/python2.7/site-packages/matlab
creating /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/engine/engineerror.py -> /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/engine/futureresult.py -> /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/engine/fevalfuture.py -> /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/engine/basefuture.py -> /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/engine/matlabengine.py -> /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/engine/__init__.py -> /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/engine/enginesession.py -> /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/engine/_arch.txt -> /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/engine/matlabfuture.py -> /root/.local/lib/python2.7/site-packages/matlab/engine
copying build/lib/matlab/mlexceptions.py -> /root/.local/lib/python2.7/site-packages/matlab
copying build/lib/matlab/__init__.py -> /root/.local/lib/python2.7/site-packages/matlab
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/_internal/mlarray_sequence.py to mlarray_sequence.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/_internal/__init__.py to __init__.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/_internal/mlarray_utils.py to mlarray_utils.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/mlarray.py to mlarray.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/engine/engineerror.py to engineerror.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/engine/futureresult.py to futureresult.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/engine/fevalfuture.py to fevalfuture.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/engine/basefuture.py to basefuture.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/engine/matlabengine.py to matlabengine.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/engine/__init__.py to __init__.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/engine/enginesession.py to enginesession.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/engine/matlabfuture.py to matlabfuture.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/mlexceptions.py to mlexceptions.pyc
byte-compiling /root/.local/lib/python2.7/site-packages/matlab/__init__.py to __init__.pyc
running install_egg_info
Writing /root/.local/lib/python2.7/site-packages/matlabengineforpython-R2016a-py2.7.egg-info
它以某种方式将 matlab 引擎安装到系统的 python 版本中,而不是 anaconda 的 py34
虚拟环境.我在 OSX 上注意到 this 并且它在我的 Mac 上工作!任何人都可以在 CentOS 上提供帮助吗?
It somehow install matlab engine into system's python version other than anaconda's py34
virtual env. I noticed this on OSX and it does work on my mac! Anyone can help with this on CentOS?
推荐答案
cd "matlabrootexternenginespython"
python setup.py install --prefix="installdir"
对于 Unix (OSX10) python2.7,使用 Anaconda
For Unix (OSX10) python2.7, using Anaconda
cd /Applications/MATLAB_R2015a.app/extern/engines/python
python setup.py install --prefix="/Users/user/anaconda/"
这是 Matlab 文档:
Here is the Matlab Document:
https://www.mathworks.com/help/matlab/matlab_external/install-matlab-engine-api-for-python-in-nondefault-locations.html
这篇关于在 Anaconda Python (Linux) 中安装 Matlab 引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 Anaconda Python (Linux) 中安装 Matlab 引擎


- 如何将一个类的函数分成多个文件? 2022-01-01
- 如何在 Python 的元组列表中对每个元组中的第一个值求和? 2022-01-01
- python check_output 失败,退出状态为 1,但 Popen 适用于相同的命令 2022-01-01
- padding='same' 转换为 PyTorch padding=# 2022-01-01
- 沿轴计算直方图 2022-01-01
- 如何在 python3 中将 OrderedDict 转换为常规字典 2022-01-01
- 使用Heroku上托管的Selenium登录Instagram时,找不到元素';用户名'; 2022-01-01
- pytorch 中的自适应池是如何工作的? 2022-07-12
- python-m http.server 443--使用SSL? 2022-01-01
- 分析异常:路径不存在:dbfs:/databricks/python/lib/python3.7/site-packages/sampleFolder/data; 2022-01-01