You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
python
with open('./pycocotools-2.0.1/setup.py') as f:
newText=f.read().replace("extra_compile_args", "extra_compile_args={'gcc': ['/Qstd=c99']},#extra_compile_args")
with open('./pycocotools-2.0.1/setup.py', "w") as f:
f.write(newText)
with open('./detectron2/setup.py') as f:
newText=f.read().replace("BuildExtension},", "BuildExtension.with_options(use_ninja=False)},")
with open('./detectron2/setup.py', "w") as f:
f.write(newText)
with open('./detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp') as f:
newText=f.read().replace("py::dict Accumulate(", "struct tm *localtime_r(time_t *_clock, struct tm *_result) { struct tm *p = localtime(_clock); if (p) *(_result) = *p; return p;};py::dict Accumulate(")
with open('./detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp', "w") as f:
f.write(newText)
exit()
cd pycocotools-2.0.1
python setup.py build install
cd ..\detectron2
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set DISTUTILS_USE_SDK=1
python setup.py build develop install
(test) D:\Temp\CondaEnvs\detectron2>python
Python 3.8.5 (default, Aug 5 2020, 09:44:06) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
import detectron2
detectron2.version
'0.2.1'
The text was updated successfully, but these errors were encountered:
This way I'm able to build and instal detectron2 on Windows 10..
I use CPU only for pytorch.
conda create -n test
conda activate test
conda install pip opencv numpy scipy git curl
conda install pytorch torchvision cpuonly -c pytorch
pip install git+https://github.com/facebookresearch/fvcore
pip install cython
curl -o pycocotools-2.0.1.tar.gz https://files.pythonhosted.org/packages/5c/82/bcaf4d21d7027fe5165b88e3aef1910a36ed02c3e99d3385d1322ea0ba29/pycocotools-2.0.1.tar.gz#sha256=1c06e73a85ed9874c1174d47064524b9fb2759b95a6997437775652f20c1711f
tar -xzf pycocotools-2.0.1.tar.gz
git clone https://github.com/facebookresearch/detectron2
python
with open('./pycocotools-2.0.1/setup.py') as f:
newText=f.read().replace("extra_compile_args", "extra_compile_args={'gcc': ['/Qstd=c99']},#extra_compile_args")
with open('./pycocotools-2.0.1/setup.py', "w") as f:
f.write(newText)
with open('./detectron2/setup.py') as f:
newText=f.read().replace("BuildExtension},", "BuildExtension.with_options(use_ninja=False)},")
with open('./detectron2/setup.py', "w") as f:
f.write(newText)
with open('./detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp') as f:
newText=f.read().replace("py::dict Accumulate(", "struct tm *localtime_r(time_t *_clock, struct tm *_result) { struct tm *p = localtime(_clock); if (p) *(_result) = *p; return p;};py::dict Accumulate(")
with open('./detectron2/detectron2/layers/csrc/cocoeval/cocoeval.cpp', "w") as f:
f.write(newText)
exit()
cd pycocotools-2.0.1
python setup.py build install
cd ..\detectron2
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set DISTUTILS_USE_SDK=1
python setup.py build develop install
(test) D:\Temp\CondaEnvs\detectron2>python
Python 3.8.5 (default, Aug 5 2020, 09:44:06) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
The text was updated successfully, but these errors were encountered: