安装Opticalspy时遇到问题

时间:2019-08-13 21:05:32

标签: python github pip install package-managers

我最近一直在学习python,并且一直在尝试将Opticalspy软件包(https://github.com/Sterncat/opticspy)安装到Anaconda软件包中。

使用命令: pip安装git + git://github.com/Sterncat/opticspy.git@master

我一直收到此错误消息:

ERROR: Command errored out with exit status 1:
 command: 'c:\users\dfsan\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dfsan\\AppData\\Local\\Temp\\pip-install-gjbmbml_\\unwrap\\setup.py'"'"'; __file__='"'"'C:\\Users\\dfsan\\AppData\\Local\\Temp\\pip-install-gjbmbml_\\unwrap\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
     cwd: C:\Users\dfsan\AppData\Local\Temp\pip-install-gjbmbml_\unwrap\
Complete output (61 lines):
_cffi__x6083f2a6xc51c3213.c
c:\users\dfsan\anaconda3\include\pyconfig.h(222): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
Traceback (most recent call last):
  File "c:\users\dfsan\anaconda3\lib\distutils\_msvccompiler.py", line 423, in compile
    self.spawn(args)
  File "c:\users\dfsan\anaconda3\lib\distutils\_msvccompiler.py", line 542, in spawn
    return super().spawn(cmd)
  File "c:\users\dfsan\anaconda3\lib\distutils\ccompiler.py", line 909, in spawn
    spawn(cmd, dry_run=self.dry_run)
  File "c:\users\dfsan\anaconda3\lib\distutils\spawn.py", line 38, in spawn
    _spawn_nt(cmd, search_path, dry_run=dry_run)
  File "c:\users\dfsan\anaconda3\lib\distutils\spawn.py", line 81, in _spawn_nt
    "command %r failed with exit status %d" % (cmd, rc))
distutils.errors.DistutilsExecError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\dfsan\anaconda3\lib\site-packages\cffi\ffiplatform.py", line 51, in _build
    dist.run_command('build_ext')
  File "c:\users\dfsan\anaconda3\lib\distutils\dist.py", line 974, in run_command
    cmd_obj.run()
  File "c:\users\dfsan\anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 78, in run
    _build_ext.run(self)
  File "c:\users\dfsan\anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
    _build_ext.build_ext.run(self)
  File "c:\users\dfsan\anaconda3\lib\distutils\command\build_ext.py", line 339, in run
    self.build_extensions()
  File "c:\users\dfsan\anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 194, in build_extensions
    self.build_extension(ext)
  File "c:\users\dfsan\anaconda3\lib\site-packages\setuptools\command\build_ext.py", line 199, in build_extension
    _build_ext.build_extension(self, ext)
  File "c:\users\dfsan\anaconda3\lib\distutils\command\build_ext.py", line 533, in build_extension
    depends=ext.depends)
  File "c:\users\dfsan\anaconda3\lib\distutils\_msvccompiler.py", line 425, in compile
    raise CompileError(msg)
distutils.errors.CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\dfsan\AppData\Local\Temp\pip-install-gjbmbml_\unwrap\setup.py", line 14, in <module>
    import unwrap.unwrap2D as unwrap2D
  File "C:\Users\dfsan\AppData\Local\Temp\pip-install-gjbmbml_\unwrap\unwrap\__init__.py", line 3, in <module>
    from unwrap.unwrap import unwrap
  File "C:\Users\dfsan\AppData\Local\Temp\pip-install-gjbmbml_\unwrap\unwrap\unwrap.py", line 4, in <module>
    from unwrap.unwrap2D import unwrap2D
  File "C:\Users\dfsan\AppData\Local\Temp\pip-install-gjbmbml_\unwrap\unwrap\unwrap2D.py", line 20, in <module>
    include_dirs=[_current_directory])
  File "c:\users\dfsan\anaconda3\lib\site-packages\cffi\api.py", line 451, in verify
    lib = self.verifier.load_library()
  File "c:\users\dfsan\anaconda3\lib\site-packages\cffi\verifier.py", line 104, in load_library
    self._compile_module()
  File "c:\users\dfsan\anaconda3\lib\site-packages\cffi\verifier.py", line 201, in _compile_module
    outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
  File "c:\users\dfsan\anaconda3\lib\site-packages\cffi\ffiplatform.py", line 22, in compile
    outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
  File "c:\users\dfsan\anaconda3\lib\site-packages\cffi\ffiplatform.py", line 58, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))
cffi.error.VerificationError: CompileError: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------

错误:命令错误,退出状态为1:python setup.py egg_info检查日志以获取完整的命令输出。

对于背景,我正在运行python 3.6.5,setuptools和pip都是最新的(Windows btw)。感谢您的帮助!

0 个答案:

没有答案
相关问题