python install davisinteractive module

To install davisinteractive today, I first used pip install davisinteractive -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.comthe method and found that it could not be installed:

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> davisinteractive

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Then try to download the package file from GitHub to install: https://github.com/albertomontesg/davis-interactive

After the download is complete, unzip it, enter the file directory, execute it python setup.py install, and still report an error:

running build_ext
building 'davisinteractive.third_party.mask_api._mask' extension
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Idavisinteractive/third_party/mask_api -IC:\Users\NOAH\.conda\envs\python37\lib\site-packages\numpy\core\include -IC:\Users\NOAH\.conda\envs\python37\include -IC:\Users\NOAH\.conda\envs\python37\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcdavisinteractive/third_party/mask_api/_mask.c /Fobuild\temp.win-amd64-cpython-37\Release\davisinteractive/third_party/mask_api/_mask.obj -Wno-cpp -Wno-unused-function -std=c99
cl : Command line error D8021 : invalid numeric argument '/Wno-cpp'
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2

But judging from the error message, the statement setup.pyof can be changed toextra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99'],extra_compile_args={'gcc': ['/Qstd=c99']},

Execute again python setup.py installand the installation is successful.

Guess you like

Origin blog.csdn.net/weixin_40973138/article/details/127113947