2015-04-15 46 views
2

我需要安装MATLAB引擎Python来调用Python函数安装MATLAB引擎的Python

我试着帮助
的步骤我使用MATLAB 2015A

我无法运行setup.py从CMD

在帮助说明

他们问我找到这个目录setup.py:

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 

我用这两个的C颂歌安装这台发动机从CMD(如管理员)

cd C:\Program Files\MATLAB\MATLAB Production Server\R2015a\extern\engines\python 
python setup.py install 

我试图Python27和Python34 这里是64位版本的问题 CMD返回错误,当我用“Python”上python setup.py install 错误是: “蟒”不被识别为内部或外部的命令

然后我试图setup.py安装它返回此错误:

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 

当我与Python的32位试用过这些代码的返回:

error: 32bit python does not work with 64bit MATLAB. Please check your version of Python 
+0

您是否安装了64位版本的python? – TheBlackCat

+0

是的,我试过两种版本 –

+0

64位版本的第一个问题(错误:没有提供任何命令) –

回答

2

指定到python.exe 64位版本的完整路径。在命令行:

C:\[path_to_python_dir]\python.exe setup.py install 

更换[path_to_python_dir]与路径到python.exe找到该目录。

1

要从操作系统提示符调用Python,请将Python的完整路径添加到PATH环境变量,或者在调用Python解释器时包含完整路径。