在配置JDet时,发现官方说明是支持 “ Windows Subsystem of Linux (WSL)” 。但是并没说支持windows环境。所以想确认下目前是否支持windows+anaconda的模式。
在配置过程中有遇到安装pycocotools的报错:
ERROR: Command errored out with exit status 1:
command: 'F:\Anaconda3\envs\jittor_env\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xuek\\AppData\\Local\\Temp\\pip-install-_dzb5f_z\\pycocotools_f4832a2397cd4598966546719d9970b8\\setup.py'"'"'; __file__='"'"'C:\\Users\\xuek\\AppData\\Local\\Temp\\pip-install-_dzb5f_z\\pycocotools_f4832a2397cd4598966546719d9970b8\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\xuek\AppData\Local\Temp\pip-wheel-ekuw0sw7'
cwd: C:\Users\xuek\AppData\Local\Temp\pip-install-_dzb5f_z\pycocotools_f4832a2397cd4598966546719d9970b8\
Complete output (19 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.10\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.10\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.10\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.10\pycocotools
running build_ext
skipping 'pycocotools\_mask.c' Cython extension (up-to-date)
building 'pycocotools._mask' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\common
creating build\temp.win-amd64-3.10\Release\pycocotools
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IF:\Anaconda3\envs\jittor_env\lib\site-packages\numpy\core\include -I./common -IF:\Anaconda3\envs\jittor_env\include -IF:\Anaconda3\envs\jittor_env\Include /Tc./common/maskApi.c /Fobuild\temp.win-amd64-3.10\Release\./common/maskApi.obj
error: command 'cl.exe' failed: None
----------------------------------------
ERROR: Failed building wheel for pycocotools
Running setup.py clean for pycocotools
Failed to build pycocotools
Installing collected packages: pycocotools, opencv-python, jittor
Running setup.py install for pycocotools ... error
ERROR: Command errored out with exit status 1:
command: 'F:\Anaconda3\envs\jittor_env\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xuek\\AppData\\Local\\Temp\\pip-install-_dzb5f_z\\pycocotools_f4832a2397cd4598966546719d9970b8\\setup.py'"'"'; __file__='"'"'C:\\Users\\xuek\\AppData\\Local\\Temp\\pip-install-_dzb5f_z\\pycocotools_f4832a2397cd4598966546719d9970b8\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\xuek\AppData\Local\Temp\pip-record-_h3r4jvp\install-record.txt' --single-version-externally-managed --compile --install-headers 'F:\Anaconda3\envs\jittor_env\Include\pycocotools'
cwd: C:\Users\xuek\AppData\Local\Temp\pip-install-_dzb5f_z\pycocotools_f4832a2397cd4598966546719d9970b8\
Complete output (21 lines):
running install
F:\Anaconda3\envs\jittor_env\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-3.10
creating build\lib.win-amd64-3.10\pycocotools
copying pycocotools\coco.py -> build\lib.win-amd64-3.10\pycocotools
copying pycocotools\cocoeval.py -> build\lib.win-amd64-3.10\pycocotools
copying pycocotools\mask.py -> build\lib.win-amd64-3.10\pycocotools
copying pycocotools\__init__.py -> build\lib.win-amd64-3.10\pycocotools
running build_ext
skipping 'pycocotools\_mask.c' Cython extension (up-to-date)
building 'pycocotools._mask' extension
creating build\temp.win-amd64-3.10
creating build\temp.win-amd64-3.10\Release
creating build\temp.win-amd64-3.10\Release\common
creating build\temp.win-amd64-3.10\Release\pycocotools
cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IF:\Anaconda3\envs\jittor_env\lib\site-packages\numpy\core\include -I./common -IF:\Anaconda3\envs\jittor_env\include -IF:\Anaconda3\envs\jittor_env\Include /Tc./common/maskApi.c /Fobuild\temp.win-amd64-3.10\Release\./common/maskApi.obj
error: command 'cl.exe' failed: None
----------------------------------------
ERROR: Command errored out with exit status 1: 'F:\Anaconda3\envs\jittor_env\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xuek\\AppData\\Local\\Temp\\pip-install-_dzb5f_z\\pycocotools_f4832a2397cd4598966546719d9970b8\\setup.py'"'"'; __file__='"'"'C:\\Users\\xuek\\AppData\\Local\\Temp\\pip-install-_dzb5f_z\\pycocotools_f4832a2397cd4598966546719d9970b8\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\xuek\AppData\Local\Temp\pip-record-_h3r4jvp\install-record.txt' --single-version-externally-managed --compile --install-headers 'F:\Anaconda3\envs\jittor_env\Include\pycocotools' Check the logs for full command output.
网上有说的如下方法在我这也不成立。
$ pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI