Open sunxuefeng123 opened 4 years ago
首先 pip install cython
首先 pip install cython
cython已经装了的
@sunxuefeng123 You can try to download the package loacally to your pc then edit setup.py and replace extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99'] with extra_compile_args={'gcc': ['/Qstd=c99']} in ./libs/datasets/pycocotools/setup.py then you can install this package from the local source.
for more on that check this link: https://stackoverflow.com/questions/60349980/is-there-a-way-to-install-cython-bbox-for-windows
download cython_bbox at https://pypi.org/project/cython-bbox/ In setup.py,Changeg extra_compile_args=[’-Wno-cpp’],TO extra_compile_args = {‘gcc’: [’/Qstd=c99’]}, Then, use "python setup.py build_ext install "
download cython_bbox at https://pypi.org/project/cython-bbox/ In setup.py,Changeg extra_compile_args=[’-Wno-cpp’],TO extra_compile_args = {‘gcc’: [’/Qstd=c99’]}, Then, use "python setup.py build_ext install "
did the same and produces Type Error:
running build_ext
building 'cython_bbox' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/src
Traceback (most recent call last):
File "setup.py", line 46, in
I meet same this issue,
I replace to extra_compile_args=['-Wno-cpp', '-Wno-unused-function', '-std=c99'],
in setup.py
. Then run python setup.py build_ext install
pip install -e git+https://github.com/samson-wang/cython_bbox.git#egg=cython-bbox
try this. this solved the issue for me.
It's not working-
running build_ext D:\vs\VC\Tools\MSVC\14.33.31629\bin\HostX86\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD "-ID:\Elpark camera test-- kims\pythonProject7\venv\lib\site-packages\nu mpy\core\include" "-ID:\Elpark camera test-- kims\pythonProject7\venv\include" -IC:\Users\user\AppData\Local\Programs\Python\Python310\include -IC:\Users\user\AppD ata\Local\Programs\Python\Python310\Include -ID:\vs\VC\Tools\MSVC\14.33.31629\include -ID:\vs\VC\Auxiliary\VS\include /Tcsrc/cython_bbox.c /Fobuild\temp.win-amd64- 3.10\Release\src/cython_bbox.obj -Wno-cpp -Wno-unused-function -std=c99 cl : Command line error D8021 : invalid numeric argument '/Wno-cpp' error: command 'D:\\vs\\VC\\Tools\\MSVC\\14.33.31629\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
my system is win10, python 3.6, cython was installed. log:
(mot) C:\Users\bujingyun>pip install cython_bbox Collecting cython_bbox Using cached cython_bbox-0.1.3.tar.gz (41 kB) Building wheels for collected packages: cython-bbox Building wheel for cython-bbox (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'd:\tool\anaconda\envs\mot\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\bujingyun\AppData\Local\Temp\pip-install-tk9l15e7\cython-bbox\setup.py'"'"'; file='"'"'C:\Users\bujingyun\AppData\Local\Temp\pip-install-tk9l15e7\cython-bbox\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\bujingyun\AppData\Local\Temp\pip-wheel-7w02hctf' cwd: C:\Users\bujingyun\AppData\Local\Temp\pip-install-tk9l15e7\cython-bbox\ Complete output (11 lines): running bdist_wheel running build running build_ext building 'cython_bbox' extension creating build creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\src C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\tool\anaconda\envs\mot\lib\site-packages\numpy\core\include -Id:\tool\anaconda\envs\mot\include -Id:\tool\anaconda\envs\mot\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-ID:\Windows Kits\10\include\10.0.17763.0\ucrt" "-ID:\Windows Kits\10\include\10.0.17763.0\shared" "-ID:\Windows Kits\10\include\10.0.17763.0\um" "-ID:\Windows Kits\10\include\10.0.17763.0\winrt" "-ID:\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc/cython_bbox.c /Fobuild\temp.win-amd64-3.6\Release\src/cython_bbox.obj -Wno-cpp cl: 命令行 error D8021 :无效的数值参数“/Wno-cpp” error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Failed building wheel for cython-bbox Running setup.py clean for cython-bbox Failed to build cython-bbox Installing collected packages: cython-bbox Running setup.py install for cython-bbox ... error ERROR: Command errored out with exit status 1: command: 'd:\tool\anaconda\envs\mot\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\bujingyun\AppData\Local\Temp\pip-install-tk9l15e7\cython-bbox\setup.py'"'"'; file='"'"'C:\Users\bujingyun\AppData\Local\Temp\pip-install-tk9l15e7\cython-bbox\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\bujingyun\AppData\Local\Temp\pip-record-8esbxua6\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\tool\anaconda\envs\mot\Include\cython-bbox' cwd: C:\Users\bujingyun\AppData\Local\Temp\pip-install-tk9l15e7\cython-bbox\ Complete output (11 lines): running install running build running build_ext building 'cython_bbox' extension creating build creating build\temp.win-amd64-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\src C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Id:\tool\anaconda\envs\mot\lib\site-packages\numpy\core\include -Id:\tool\anaconda\envs\mot\include -Id:\tool\anaconda\envs\mot\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-ID:\Windows Kits\10\include\10.0.17763.0\ucrt" "-ID:\Windows Kits\10\include\10.0.17763.0\shared" "-ID:\Windows Kits\10\include\10.0.17763.0\um" "-ID:\Windows Kits\10\include\10.0.17763.0\winrt" "-ID:\Windows Kits\10\include\10.0.17763.0\cppwinrt" /Tcsrc/cython_bbox.c /Fobuild\temp.win-amd64-3.6\Release\src/cython_bbox.obj -Wno-cpp cl: 命令行 error D8021 :无效的数值参数“/Wno-cpp” error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe' failed with exit status 2
ERROR: Command errored out with exit status 1: 'd:\tool\anaconda\envs\mot\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\bujingyun\AppData\Local\Temp\pip-install-tk9l15e7\cython-bbox\setup.py'"'"'; file='"'"'C:\Users\bujingyun\AppData\Local\Temp\pip-install-tk9l15e7\cython-bbox\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\bujingyun\AppData\Local\Temp\pip-record-8esbxua6\install-record.txt' --single-version-externally-managed --compile --install-headers 'd:\tool\anaconda\envs\mot\Include\cython-bbox' Check the logs for full command output.