在VS里运行python的程序,具体就是一个很简单的print
然后出现了如图的错误:
按照程序上Run后面的指令在cmd上运行以后,出现以下情况:
running build_ext
building '_pydevd_bundle.pydevd_cython' extension
e:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IE:\Anaconda\Anaconda\include -IE:\Anaconda\Anaconda\include "-Ie:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\ATLMFC\include" "-Ie:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" -IE:\c++\VC98\atl\include -IE:\c++\VC98\mfc\include -IE:\c++\VC98\include /Tc_pydevd_bundle/pydevd_cython.c /Fobuild\temp.win-amd64-3.7\Release\_pydevd_bundle/pydevd_cython.obj
pydevd_cython.c
_pydevd_bundle/pydevd_cython.c(28837): error C2039: “exc_type”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28838): error C2039: “exc_value”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28839): error C2039: “exc_traceback”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28846): error C2039: “exc_type”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28847): error C2039: “exc_value”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28848): error C2039: “exc_traceback”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28849): error C2039: “exc_type”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28850): error C2039: “exc_value”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28851): error C2039: “exc_traceback”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28896): error C2039: “exc_type”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28897): error C2039: “exc_value”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28898): error C2039: “exc_traceback”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28899): error C2039: “exc_type”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28900): error C2039: “exc_value”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(28901): error C2039: “exc_traceback”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(29032): error C2039: “exc_type”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(29033): error C2039: “exc_value”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(29034): error C2039: “exc_traceback”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(29035): error C2039: “exc_type”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(29036): error C2039: “exc_value”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
_pydevd_bundle/pydevd_cython.c(29037): error C2039: “exc_traceback”: 不是“_ts”的成员
e:\anaconda\anaconda\include\pystate.h(212): note: 参见“_ts”的声明
error: command 'e:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
按照寻找到pydevd的方法,使用
python setup_cython.py build ext --inplace
指令,输出的错误还是一样,所以求解怎么解决这种情况