繁体   English   中英

安装Python模块时出现VC ++错误

[英]VC++ error while installing Python module

我有Python 2.7的Anaconda发行版。 我要操作Basler相机。 由于OpenCV不能提供这种可能性,因此我在代码周围下载了Python包装程序,这使我可以对其进行操作。 但是,我在安装此包装程序时遇到问题。 我已经安装了“ VC ++ for Python”,但是当我从anaconda命令窗口运行“ install”命令时,出现以下错误。 我究竟做错了什么? 我有Windows 10 64位。

[py27] C:\Users\DDV\Downloads\PyPylon-master\PyPylon-master>python 
setup.py install
running install
running bdist_egg
running egg_info
writing pypylon.egg-info\PKG-INFO
writing top-level names to pypylon.egg-info\top_level.txt
writing dependency_links to pypylon.egg-info\dependency_links.txt
reading manifest file 'pypylon.egg-info\SOURCES.txt'
writing manifest file 'pypylon.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
skipping 'cython\version.cpp' Cython extension (up-to-date)
skipping 'cython\factory.cpp' Cython extension (up-to-date)
building 'pypylon.cython.factory' extension
C:\Users\DDV\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG "-IC:\Program Files\Basler\pylon 5\Development\include" -IC:\Users\DDV\Anaconda3\envs\py27\lib\site-packages\numpy\core\include -IC:\Users\DDV\Anaconda3\envs\py27\include -IC:\Users\DDV\Anaconda3\envs\py27\PC /Tpcython\factory.cpp /Fobuild\temp.win-amd64-2.7\Release\cython\factory.obj
factory.cpp
C:\Users\DDV\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
c:\users\DDV\anaconda3\envs\py27\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
C:\Program Files\Basler\pylon 5\Development\include\Base/GCTypes.h(77) : error C2371: 'int8_t' : redefinition; different basic types
        C:\Users\DDV\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Include\stdint.h(87) : see declaration of 'int8_t'
C:\Program Files\Basler\pylon 5\Development\include\GenApi/GenApiLinkage.h(40) : warning C4081: expected ')'; found '('
C:\Program Files\Basler\pylon 5\Development\include\GenApi/GenApiLinkage.h(41) : warning C4081: expected ')'; found '('
C:\Program Files\Basler\pylon 5\Development\include\pylon/PylonUtilityIncludes.h(44) : warning C4081: expected ')'; found '('
C:\Program Files\Basler\pylon 5\Development\include\pylon/PylonIncludes.h(101) : warning C4081: expected ')'; found '('
cython\factory.cpp(3141) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
error: command 'C:\\Users\\DDV\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2

事实证明,当前版本中的此Python包装器只能与Python 3.5一起安装。 因此,要成功安装此软件包,需要使用带有Visual Studio Community版本的Python 3.5。 安装软件包后,它可以正常工作,并在python和Basler相机之间创建一个接口。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM