mlabwrap设置查询

nat*_*son 9 python matlab mlabwrap

我碰巧偶然发现了用户brentlance发布的关于Matlab与Python链接的答案,并且想知道我是否可以向社群询问有关mlabwrap模块初始设置的一些建议.

我使用的是Windows 7 32位,使用Matlab R2012a和Python 2.7(来自Python(x,y)科学计算软件包).当我尝试运行时:

python setup.py install
Run Code Online (Sandbox Code Playgroud)

在malbwrap目录中,控制台返回一个非常大的错误,如下所示:

WINDOWS SPECIFIC ISSUE? Unable to remove c:\users\nathan\appdata\local\temp\tmpv
tzipc; please delete it manually
[Error 32] The process cannot access the file because it is being used by anothe
r process: 'c:\\users\\nathan\\appdata\\local\\temp\\tmpvtzipc'

running install
running build
running build_py
running build_ext
building 'mlabraw' extension
Traceback (most recent call last):
  File "setup.py", line 189, in <module>
    extra_compile_args=EXTRA_COMPILE_ARGS,
  File "C:\Python27\lib\distutils\core.py", line 152, in setup
    dist.run_commands()
  File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\install.py", line 563, in run
    self.run_command('build')
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build.py", line 127, in run
    self.run_command(cmd_name)
  File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
    cmd_obj.run()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 340, in run
    self.build_extensions()
  File "C:\Python27\lib\distutils\command\build_ext.py", line 449, in build_exte
nsions
    self.build_extension(ext)
  File "C:\Python27\lib\distutils\command\build_ext.py", line 499, in build_exte
nsion
    depends=ext.depends)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 474, in compile
    self.initialize()
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 384, in initialize
    vc_env = query_vcvarsall(VERSION, plat_spec)
  File "C:\Python27\lib\distutils\msvc9compiler.py", line 300, in query_vcvarsal
l
    raise ValueError(str(list(result.keys())))
ValueError: [u'path']
Run Code Online (Sandbox Code Playgroud)

针对其他各种问题,我迄今为止尝试过以下方面:

  1. 我按照这里发布的安装指南
  2. 已安装Microsoft VS Express 2010和SDK 7.1版
  3. 将SDK C++编译器设置为Matlab中的默认值
  4. 指向的msvc9compiler.py脚本(C:\ Python27\LIB \的distutils\msvc9compiler.py)在我的VS Express中的常用工具文件夹中安装,以避免"无法找到vcvarsall.bat"的错误,如所描述这里.

我们非常感谢您提供的任何帮助.非常感谢.