enter image description here我正在conda环境中安装软件包,以便根据https://www.youtube.com/watch?v=nUjGLjOmF7o&list=PLX-LrBk6h3wQ17z1axCOAS1QVS1dvTEvR和github页面https://github.com/ildoonet/tf-pose-estimation上的教程运行姿势估计,在这里您必须运行要求.txt文件以安装第3方软件包,使其在$ pip3 install -r requirements.txt
结尾运行。
我有3个错误。第一个是我已经找到并安装的Cython软件包。第二个错误:Error Microsoft Visual C++ 14.0 is required
我解决了这里的问题https://medium.com/@jacky_ttt/day060-fix-error-microsoft-visual-c-14-0-is-required-629413e798cd,并在Visual Studio c ++生成工具中安装了必要的软件包。但是我遇到了一个新的错误,即使我也可以解决。我将不胜感激任何帮助。错误出现在我的anaconda提示符下:
Building wheels for collected packages: pycocotools, tensorpack
Building wheel for pycocotools (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\M S Tiwana\.conda\envs\tfposee\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MSTIWA~1\\AppData\\Local\\Temp\\pip-install-vjk9vvy3\\pycocotools\\setup.py'"'"'; __file__='"'"'C:\\Users\\MSTIWA~1\\AppData\\Local\\Temp\\pip-install-vjk9vvy3\\pycocotools\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\MSTIWA~1\AppData\Local\Temp\pip-wheel-fdystmqn'
cwd: C:\Users\MSTIWA~1\AppData\Local\Temp\pip-install-vjk9vvy3\pycocotools\
Complete output (19 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.7\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.7\pycocotools
running build_ext
building 'pycocotools._mask' extension
creating build\temp.win-amd64-3.7
creating build\temp.win-amd64-3.7\Release
creating build\temp.win-amd64-3.7\Release\pycocotools
creating build\temp.win-amd64-3.7\Release\common
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD "-IC:\Users\M S Tiwana\.conda\envs\tfposee\lib\site-packages\numpy\core\include" -Icommon "-IC:\Users\M S Tiwana\.conda\envs\tfposee\include" "-IC:\Users\M S Tiwana\.conda\envs\tfposee\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt" /Tcpycocotools/_mask.c /Fobuild\temp.win-amd64-3.7\Release\pycocotools/_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\\2019\\Community\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Building wheel for tensorpack (setup.py) ... done
Created wheel for tensorpack: filename=tensorpack-0.10-py2.py3-none-any.whl size=291265 sha256=85cc191f624cecba1af9d7bfeff01bd6fd592c8763010a1468abc0c6ccedfeac
Stored in directory: C:\Users\MSTIWA~1\AppData\Local\Temp\pip-ephem-wheel-cache-cjd1_8p6\wheels\8f\c4\7d\b7ca213c76a0b78c772c6d3173364b8102d262acda1ec45207
Successfully built tensorpack
Failed to build pycocotools
Installing collected packages: pycocotools, slidingwindow, tabulate, msgpack, msgpack-numpy, tensorpack
Running setup.py install for pycocotools ... error
是否存在Visual Studio c ++生成工具安装错误?
答案 0 :(得分:2)
pycocotools适用于linux,因为您使用的是Windows 10
代替使用:pip install pycocotools
使用此命令:pip install pycocotools-windows