Reputation: 75
I need to install MATLAB Engine for Python to call python functions
I tried the steps on Help
I'm using MATLAB 2015a
I can't run setup.py from CMD
in the Help instructions they asked me to find setup.py on this dir:
C:\Program Files\MATLAB\MATLAB Production Server\R2015a\matlabroot\extern\engines\python
but when I searched on matlab dir I found it on this dir :
C:\Program Files\MATLAB\MATLAB Production Server\R2015a\extern\engines\python
I used both of these Codes to install this engine from CMD (as Admin)
cd C:\Program Files\MATLAB\MATLAB Production Server\R2015a\extern\engines\python
python setup.py install
I tried Python27 and Python34
here is the problem
with 64-bit version CMD returns error when I use "Python
" on python setup.py install
error is:
'python' is not recognized as an internal or external command
then I tried setup.py install it returns this error:
SystemExit: usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: no commands supplied
when I tried both of these codes with Python 32-bit it returns:
error: 32bit python does not work with 64bit MATLAB. Please check your version of Python
Upvotes: 2
Views: 4741
Reputation: 156
To call Python from your operating system prompt, either add the full path to Python to your PATH environment variable, or include the full path when you call the Python interpreter.
Upvotes: 1
Reputation: 10308
Specify the full path to the 64bit version of python.exe
. In the commandline:
C:\[path_to_python_dir]\python.exe setup.py install
Replace [path_to_python_dir]
with the path to the directory where python.exe
is found.
Upvotes: 3