error while executing py.textwrap.wrap(T)

조회 수: 1 (최근 30일)
Avinash Siddaramappa
Avinash Siddaramappa 2015년 7월 6일
댓글: Robert Snoeberger 2015년 12월 17일
I am working on MATLAB 2015a, and would like to run Python script on matlab. I tried the example, unfortunately I get an error: Undefined variable "py" or class "py.textwrap.wrap".
This is the output for pyversion: version: '2.7' executable: 'C:\Python27\pythonw.exe' library: 'C:\Python27\python27.dll' home: 'C:\Python27' isloaded: 0
Shouldn't isloaded be 1 insead of 0?
I even tried the suggested troubleshoot

답변 (2개)

Robert Snoeberger
Robert Snoeberger 2015년 7월 6일
Are you using 64-bit MATLAB? If so, did you check if both MATLAB and Python are 64-bit?
  댓글 수: 2
Avinash Siddaramappa
Avinash Siddaramappa 2015년 7월 7일
yeah both are 64-bit
Robert Snoeberger
Robert Snoeberger 2015년 7월 7일
Can you provide the output of the following two MATLAB commands?
>> computer arch
>> system('C:\Python27\pythonw.exe -c "import platform; print platform.architecture()"');

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


Matthew Connolly
Matthew Connolly 2015년 12월 16일
It seems like this question was never ansewered. I am running into the same problem. My output from the aforementioned commands is as follows:
>> computer arch
ans =
win64
>> system('C:\Python27\pythonw.exe -c "import platform; print platform.architecture()"');
('64bit', 'WindowsPE')
Any help on this would be appreciated.

카테고리

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