我需要安装pyliblo 0.10.0 Python软件包扩展名才能打开需要它的项目。当我尝试运行pip install pyliblo
安装它时,出现错误消息:
Installing collected packages: pyliblo
Running setup.py install for pyliblo ... error
ERROR: Complete output from command 'c:\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\rapha\\AppData\\Local\\Temp\\pip-install-7yrf4e9p\\pyliblo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\rapha\AppData\Local\Temp\pip-record-wy9ir57j\install-record.txt' --single-version-externally-managed --compile:
ERROR: running install
running build
running build_ext
cythoning src/liblo.pyx to src\liblo.c
building 'liblo' extension
creating build
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\src
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\python37\include -Ic:\python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\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" /Tcsrc\liblo.c /Fobuild\temp.win-amd64-3.7\Release\src\liblo.obj -fno-strict-aliasing -Werror-implicit-function-declaration -Wfatal-errors
clÿ: Ligne de commande error D8021ÿ: argument num‚rique non valide '/Werror-implicit-function-declaration'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.20.27508\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command "'c:\python37\python.exe' -u -c 'import setuptools, tokenize;__file__='"'"'C:\\Users\\rapha\\AppData\\Local\\Temp\\pip-install-7yrf4e9p\\pyliblo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\rapha\AppData\Local\Temp\pip-record-wy9ir57j\install-record.txt' --single-version-externally-managed --compile" failed with error code 1 in C:\Users\rapha\AppData\Local\Temp\pip-install-7yrf4e9p\pyliblo\
我还尝试通过从their official website下载.tar.gz文件,解压缩并运行./setup.py build
来安装不带pip的pyliblo 0.10.0,但这又一次给了我一个错误,略有不同但似乎原因与尝试安装pip时相同:
PS D:\pyliblo-0.10.0> python setup.py build
running build
running build_ext
skipping 'src\liblo.c' Cython extension (up-to-date)
building 'liblo' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Python37\include -IC:\Python37\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\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" /Tcsrc\liblo.c /Fobuild\temp.win-amd64-3.7\Release\src\liblo.obj -fno-strict-aliasing -Werror-implicit-function-declaration -Wfatal-errors
cl : Ligne de commande error D8021 : argument numérique non valide '/Werror-implicit-function-declaration'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.20.27508\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
我正在运行Win10 64位环境,并且安装了安装pyliblo的所有依赖项:
我想我可能需要告诉编译器在哪里可以找到我的liblo安装,但这只是一个疯狂的猜测。
感谢您的帮助,这几天来一直让我发疯。
答案 0 :(得分:0)
尝试使用此命令:
pip install pyliblo==0.10.0