我需要安装MATLAB引擎,以便Python调用python函数。
我试着用帮助的步骤
我用的是MATLAB 2015a
我不能从CMD运行setup.py
在帮助说明中,他们要求我在这个dir上找到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我使用这两种代码从CMD (作为管理员)安装了这个引擎。
cd C:\Program Files\MATLAB\MATLAB Production Server\R2015a\extern\engines\python
python setup.py install我尝试了Python27和Python34,这里是64位CMD返回错误的问题,当我在python setup.py install错误上使用"Python“时是:‘Python’不被识别为内部或外部命令。
然后我尝试了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发布于 2015-04-15 15:45:55
指定64位版本的python.exe的完整路径。在命令行中:
C:\[path_to_python_dir]\python.exe setup.py install将[path_to_python_dir]替换为找到python.exe的目录的路径。
发布于 2017-02-10 14:10:28
要从操作系统提示符调用Python,可以将Python的完整路径添加到path环境变量中,或者在调用Python解释器时包含完整路径。
https://stackoverflow.com/questions/29654225
复制相似问题