import matlab.engine fails with linux and a non-standard installation directory
1 次查看(过去 30 天)
显示 更早的评论
Hi
I've installed python in $HOME/usr/local and then the matlab link with:
$HOME/usr/local/bin/python setup.py build --build-base="$HOME/temp" install
However when I 'import matlab.engine' in python, I get the error
EnvironmentError: The installation of MATLAB Engine for Python is corrupted. Please reinstall it or contact MathWorks Technical Support for assistance.
I tried setting LD_LIBRARY_PATH=~/usr/local/lib/, and that didn't work. I also noticed that matlabengineforpython2_7.so had not been installed, but I wasn't sure what to do about that
Any suggestions? Do I gave to set any matlab related environment variables?
thanks
Richard
0 个评论
采纳的回答
Bo Li
2016-3-14
Does your Python version support wide-Unicode?
>>> import sys
>>> if sys.maxunicode > 65535:
... print 'wide-unicde'
... else:
... print 'narrow-unicode'
Following link mentions the System Requirements:
What is the output in verbose mode?
%python -vvv
>>>import matlab.engine
>>>import matlabengineforpython2_7
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call MATLAB from Python 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!