pymzml 在 Anaconda Spyder 中安装错误

pymzml install error in Anaconda Spyder

我使用 Anaconda Spyder。 Python 3.6 版本。

OS 是 Windows 7 64 位

我在 IPython 控制台中写了。

!pip install pymzml

然后我收到此错误消息。

Collecting pymzml
  Using cached pymzml-2.0.0.zip
Building wheels for collected packages: pymzml
  Running setup.py bdist_wheel for pymzml: started
  Running setup.py bdist_wheel for pymzml: finished with status 'error'
  Complete output from command C:\ProgramData\Anaconda3\python.exe -u -c 
"import setuptools, 
 tokenize;__file__='C:\Users\user\AppData\Local\Temp\pip-build-8r_4srar\pymzml\setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, 
__file__, 'exec'))" bdist_wheel -d 
C:\Users\user\AppData\Local\Temp\tmpb89hzuklpip-wheel- --python-tag cp36:
  [ pymzML ] Warning: no plotly installed ...
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\pymzml
  copying pymzml\decoder.py -> build\lib.win-amd64-3.6\pymzml
  copying pymzml\file_interface.py -> build\lib.win-amd64-3.6\pymzml
  copying pymzml\ms_numpress.py -> build\lib.win-amd64-3.6\pymzml

.....

  running build_ext
  cythoning C:\Users\user\AppData\Local\Temp\pip-build-8r_4srar\pymzml\Numpress\PyNumpress.pyx to C:\Users\user\AppData\Local\Temp\pip-build-8r_4srar\pymzml\Numpress\PyNumpress.cpp
  building 'PyNumpress' extension
  error: [WinError 3] The system cannot find the path specified.: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\PlatformSDK\lib'

如何在Anaconda Spyder环境下安装pymzml

(此处为 Spyder 维护者)关于您的问题,有两点需要注意:

  1. 您的命令失败,因为您的系统中没有安装 Microsoft Visual Studio 2013 编译器。没有这个编译器,将无法安装这个包。
  2. 我们的 IPython 控制台用于 运行 Python 代码,或使用 !foo 语法的非常简单的外部命令。对于更复杂的任务(如安装包),您需要使用真正的终端(即 cmd.exe 在您的情况下)。