python setup.py build develop_python setup.py build develop编译出错

我的环境:windows10 pytorch1.6 python3.8 VC14.1

我的电脑没有GPU,但是安装了CUDA和cudnn,在编译apex的时候,使用python setup.py install --cuda_ext --cpp_ext会报错,网上有查到去掉--cuda_ext --cpp_ext,可以成功,不知道这个是干嘛用的,但确实去掉会成功,在执行python setup.py build develop的时候,报出了如下错误,暂时还没有解决,求指导 ,感谢

(pytorch) C:\Users\zgli\Desktop\detect\maskrcnn-benchmark>python setup.py build develop

No CUDA runtime is found, using CUDA_HOME='C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0'

running build

running build_py

running build_ext

D:\anaconda\envs\pytorch\lib\site-packages\torch\utils\cpp_extension.py:264: UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。

warnings.warn('Error checking compiler version for {}: {}'.format(compiler, error))

building 'maskrcnn_benchmark._C' extension

Emitting ninja build file C:\Users\zgli\Desktop\detect\maskrcnn-benchmark\build\temp.win-amd64-3.8\Release\build.ninja...

Compiling objects...

Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)

[1/3] cl /showIncludes /nologo /Ox /W3 /GL /DNDEBUG /MD /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -IC:\Users\zgli\Desktop\detect\maskrcnn-benchmark\maskrcnn_benchmark\csrc -ID:\anaconda\envs\pytorch\lib\site-packages\torch\include -ID:\anaconda\envs\pytorch\lib\site-packages\torch\include\torch\csrc\api\include -ID:\anaconda\envs\pytorch\lib\site-packages\torch\include\TH -ID:\anaconda\envs\pytorch\lib\site-packages\torch\include\THC -ID:\anaconda\envs\pytorch\include -ID:\anaconda\envs\pytorch\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.6.1\include\um" "-ID:\Windows Kits\10\include\10.0.18362.0\ucrt" "-ID:\Windows Kits\10\include\10.0.18362.0\shared" "-ID:\Windows Kits\10\include\10.0.18362.0\um" "-ID:\Windows Kits\10\include\10.0.18362.0\winrt" "-ID:\Windows Kits\10\include\10.0.18362.0\cppwinrt" -ID:\VisualStudio\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64 -ID:\VisualStudio\VC\Tools\MSVC\14.16.27023\include "-ID:\Windows Kits\10\Include\10.0.17763.0\shared" "-ID:\Windows Kits\10\Include\10.0.17763.0\ucrt" "-ID:\Windows Kits\10\Include\10.0.17763.0\um" "-ID:\Windows Kits\10\Include\10.0.17763.0\winrt" -c C:\Users\zgli\Desktop\detect\maskrcnn-benchmark\maskrcnn_benchmark\csrc\vision.cpp /FoC:\Users\zgli\Desktop\detect\maskrcnn-benchmark\build\temp.win-amd64-3.8\Release\Users\zgli\Desktop\detect\maskrcnn-benchmark\maskrcnn_benchmark\csrc\vision.obj -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++14

FAILED: C:/Users/zgli/Desktop/detect/maskrcnn-benchmark/build/temp.win-amd64-3.8/Release/Users/zgli/Desktop/detect/maskrcnn-benchmark/maskrcnn_benchmark/csrc/vision.obj

cl /showInc

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
根据引用\[1\]中的博客,要在iou3d_nms_setup.py文件中进行构建,可以进行以下修改: 在setup.py文件中添加以下代码: ``` include_dirs = \[os.path.realpath('../include'), '/usr/local/cuda/include/'\] ``` 修改make_cuda_ext函数: ``` def make_cuda_ext(name, module, sources): cuda_ext = CUDAExtension( name='%s.%s' % (module, name), sources=\[os.path.join(*module.split('.'), src) for src in sources\], include_dirs=include_dirs ) return cuda_ext ``` 然后,根据引用\[2\]中的说明,可以运行以下命令进行构建: ``` python demo/image_demo.py demo/demo.jpg yolov3_mobilenetv2_320_300e_coco.py yolov3_mobilenetv2_320_300e_coco_20210719_215349-d18dff72.pth --device cpu --out-file result.jpg ``` 如果需要安装MMCV,可以根据引用\[3\]中的步骤进行安装: ``` Step 0.InstallMMCVusingMIM. pip install -U openmim mim install mmcv-full==1.5.0 (版本必须在\[1.3.17,1.5.0\]区间内) ``` 这样就可以进行iou3d_nms_setup.py的构建了。 #### 引用[.reference_title] - *1* [fatal error: cuda.h: 没有那个文件或目录( pcdet/ops/iou3d_nms/src/iou3d_cpu.cpp:12:18: fatal error: cuda.h: )](https://blog.csdn.net/jiachang98/article/details/121933403)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [AssertionError: iou3d_boxes_iou_bev_forward miss in module _ext ----安装mmdetaction过程](https://blog.csdn.net/weixin_44717949/article/details/126105865)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值