import matlab.engine error for python

조회 수: 3 (최근 30일)
roy zhang
roy zhang 2018년 10월 26일
댓글: madhan ravi 2018년 11월 1일
Hello all, I can input "import matlab" successfully, but when I input "import matlab.engine", the terminal will print " Traceback (most recent call last): File "<stdin>", line 1, in module File "/home/rzhang24/Documents/Python/matlab_engines_install/lib/python2.7/site-packages/matlab/engine/__init__.py", line 62, in module 'MathWorks Technical Support for assistance: %s' % e) EnvironmentError: Please reinstall MATLAB Engine for Python or contact MathWorks Technical Support for assistance: /cad/adi/apps/mathworks/matlab/2017b/extern/engines/python/dist/matlab/engine/glnxa64/matlabengineforpython2_7.so: undefined symbol: PyUnicodeUCS4_DecodeUTF16".
The path "/home/rzhang24/Documents/Python/matlab_engines_install/" is the package destintion folder, it has been added in the .cshrc as the command "set PYTHONPATH = /home/rzhang24/Documents/Python/matlab_engines_install/lib/python2.7/site-packages:$PYTHONPATH".
The version of matlab & python is matlab 2017b and Python 2.7.9, both are 64 bit, but sys.maxunicode is narrow.
Could you tell me how to fix it, I don't have root right. Many thanks.

답변 (1개)

madhan ravi
madhan ravi 2018년 10월 26일
편집: madhan ravi 2018년 10월 26일
  댓글 수: 2
roy zhang
roy zhang 2018년 11월 1일
Many Thanks, I have solved the problem.
madhan ravi
madhan ravi 2018년 11월 1일
Anytime :) ,If it worked for you make sure to accept the answer so that people know the question is solved

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Call MATLAB from Python에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by