error while executing py.textwrap.wrap(T)

1 visualización (últimos 30 días)
Avinash Siddaramappa
Avinash Siddaramappa el 6 de Jul. de 2015
Comentada: Robert Snoeberger el 17 de Dic. de 2015
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

Respuestas (2)

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

Iniciar sesión para comentar.


Matthew Connolly
Matthew Connolly el 16 de Dic. de 2015
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.

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by