我尝试在Cython(http://docs.cython.org/en/latest/src/tutorial/cython_tutorial.html#cython-hello-world)中运行基本教程,但是它不起作用。
我已尝试通过以下方式解决此问题:LINK : fatal error LNK1104: cannot open file 'C:\Users\hp\.pyxbld\lib.win32-2.7\gensim\models\word2vec_inner.pyd'帖子,但没有帮助。
我有Windows 10和VisualStudio 2019社区版本。我还更新了我的环境变量,并创建了相应的“ helloworld.c”文件。但是我仍然收到以下错误:
C:\>python C:\Users\Desktop\Programming\NLP\setup.py build_ext --inplace
Compiling C:\Users\Desktop\Programming\NLP\helloworld.pyx because it changed.
[1/1] Cythonizing C:\Users\Desktop\Programming\NLP\helloworld.pyx
running build_ext
building 'helloworld' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /TcC:\Users\Desktop\Programming\NLP\helloworld.c /Fobuild\temp.win-amd64-3.6\Release\Users\Desktop\Programming\NLP\helloworld.obj
helloworld.c
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /nodefaultlib:libucrt.lib ucrt.lib /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\ProgramData\Anaconda3\libs /LIBPATH:C:\ProgramData\Anaconda3\PCbuild\amd64 "/LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\lib\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\ucrt\x64" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.17763.0\um\x64" /EXPORT:PyInit_helloworld build\temp.win-amd64-3.6\Release\Users\Desktop\Programming\NLP\helloworld.obj /OUT:C:\helloworld.cp36-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.6\Release\Users\Desktop\Programming\NLP\helloworld.cp36-win_amd64.lib
LINK : fatal error LNK1104: cannot open file "C:\helloworld.cp36-win_amd64.pyd"
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.21.27702\\bin\\HostX86\\x64\\link.exe' failed with exit status 1104
我使用anaconda promt运行代码,而我的python版本是3.6