备忘-win10安装detectron2相关的一些命令和代码(目前还是没成功)

call "D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64 -vcvars_ver=14.10

set DISTUTILS_USE_SDK=1

python setup.py build --force develop

cocoapi(windows):
https://github.com/philferriere/cocoapi
cd coco/PythonAPI
python setup.py build_ext --inplace
python setup.py build_ext install
(中间要装个matplotlib)
打开cmd输入
import pycocotools;
from pycocotools.coco import COCO
没报错即成功

安装fvcore:
下载链接:https://github.com/facebookresearch/fvcore
然后cd到setup.py所在目录,用以下指令安装
python setup.py build --force develop
打开cmd输入 import fvcore 没报错即成功

安装的版本:python3.6
conda install pytorch==1.7.0 torchvision==0.8.0 torchaudio==0.7.0 cudatoolkit=10.1 -c pytorch
conda install --use-local pytorch-1.7.0-py3.6_cuda101_cudnn7_0.tar.bz2


python setup.py clean --all
python setup.py build develop

INCLUDE 
C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\ucrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\um
C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\shared
C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\winrt
C:\Program Files (x86)\Windows Kits\10\Include\10.0.14393.0\cppwinrt
D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\include

LIB
D:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\lib\x64
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\ucrt\x64
C:\Program Files (x86)\Windows Kits\10\Lib\10.0.14393.0\um\x64

test.cpp:
#include <iostream>
using namespace std;

int main(int argc,char** argv)
{
    cout << "hello,world"<< endl;
    system("pause");
    return 0;
}

生成了中间文件test.obj和可执行文件test.exe,并输入.\test.exe,屏幕输出hello,world


 

上一篇:react入坑记录(一)-vscode-react环境配置


下一篇:Castle.ActiveRecord的ProxyFactory配置