New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【已顺利训练】Windows踩坑记录 #440
Comments
第四个问题怎么解决呀?重装是重装什么? |
您好,我在第三个问题运行python setup.py develop报这样的错误是为什么呢? |
你好,我运行python setup.py develop也报错了,请问你解决了吗? |
已经解决了
在 2022-11-04 22:22:39,"WanFeng123313" ***@***.***> 写道:
你好,我运行python setup.py develop也报错了,请问你解决了吗?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
|
在setup.py中把 cmdclass={'build_ext': BuildExtension}改为cmdclass={'build_ext': BuildExtension.with_options(use_ninja=False)}
| |
卜玺
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2022年11月7日 20:06 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***> ,
***@***.***> |
| 主题 | Re: [hukaixuan19970627/yolov5_obb] 【已顺利训练】Windows踩坑记录 (Issue #440) |
已经解决了 在 2022-11-04 22:22:39,"WanFeng123313" @.> 写道: 你好,我运行python setup.py develop也报错了,请问你解决了吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.>
请问你是怎么解决的?我那天试了一天都没解决掉
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
用的vs还是pycharm,MSVC安装失败,尝试了很多次,可以发一份编译好的文件给我吗? |
pycharm。msvc我安装了vs2019。用别人编译的好像不行。我之前试过。
| |
卜玺
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2022年11月8日 22:05 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***> ,
***@***.***> |
| 主题 | Re: [hukaixuan19970627/yolov5_obb] 【已顺利训练】Windows踩坑记录 (Issue #440) |
用的vs还是pycharm,MSVC安装失败,尝试了很多次,可以发一份编译好的文件给我吗?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
我还是不行,没有解决这个问题 |
你这个报错也不完整。不清楚具体原因。我用的pytoch版本为1.10+cu113
| |
卜玺
|
|
***@***.***
|
---- 回复的原邮件 ----
| 发件人 | ***@***.***> |
| 发送日期 | 2022年11月9日 10:41 |
| 收件人 | ***@***.***> |
| 抄送人 | ***@***.***> ,
***@***.***> |
| 主题 | Re: [hukaixuan19970627/yolov5_obb] 【已顺利训练】Windows踩坑记录 (Issue #440) |
你好,我在第三个问题运行 python setup.py 开发报这样的错误是为? runtimeerror:error compile objects forextension
你好,我运行python setup.py develop也报错了,请问你解决了吗?
我还是不行,没有解决这个问题
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
谢谢,谢谢,我也成功运行了 |
if you are in this situation. Windows compiles successfully, but there is a problem in training. The loss does not drop. The same data, models and parameters can be trained normally under Ubuntu. Epoch gpu_mem box obj cls theta labels img_size Epoch gpu_mem box obj cls theta labels img_size |
卡了一周多终于解决了,感谢! |
你好,请问这个问题解决了嘛,我也在这一步出现了问题?如果解决了具体是如何解决的呢 |
把msvc装好就行了 |
您好,拜托您百忙之中看了我这个问题,看了所有提问都没人问这个: |
安装visual studio 2019里的用于C++的组件,安装后在去搜一下配置环境变量 |
好不容易装好了环境跑通了demo,看很多朋友都有windows运行的问题,分享一下我的踩坑(排坑)记录,希望有帮助。
先检查:
pytorch<=1.10(原因见issue #151 )
cuda和pytorch版本是否匹配
在命令行输入nvcc -V检查cuda是否可用,输入cl检查msvc是否可用(别的c++ compiler理论上也可以但我用的是这个)
正常输出:
确保这些所有就应该能够正常运行。以下是具体报错和解决办法。
首先列出所有问题:
error: [WinError 2] 系统找不到指定的文件。
1. OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
原因:没有安装cuda或cuda没有加入环境变量
解决:(临时解决)在命令行输入 set CUDA_HOME=/usr/local/cuda-X.X,建议搜索如何添加cuda到环境变量一劳永逸解决。
Ps. 我后来发现是cuda装在了anaconda里面,真实环境里根本没有cuda
2. UserWarning: Error checking compiler version for cl: [WinError 2] 系统找不到指定的文件。
原因:没装msvc或者没有配置到环境变量
解决:如果没装MSVC或其她compiler,先安装;如果装好了依然报这个错,将cl.exe添加到path环境变量。配好之后在命令行输入cl,正常输出见开头。
3. ImportError: cannot import name 'nms_rotated_ext' from partially initialized module 'utils.nms_rotated' (most likely due to a circular import)
原因:nms_rotated_ext是从yolov5_obb-master\utils\nms_rotated\src里面的cpp或cu文件编译过来的,需要先进行编译,python才能读懂。因为编码问题,poly_nms_cuda.cu那个文件需要换成 #224 中的版本。
解决:在命令行cd utils\nms_rotated转到setup.py所在的文件夹,然后输入python setup.py develop
4. running build_ext
error: [WinError 2] 系统找不到指定的文件。
原因:msvc或cuda compiler不可用
解决:重装。验证msvc:命令行输入cl;验证cuda:命令行输入nvcc -V
5. fatal error C1083: 无法打开包括文件: “THC/THC.h”: No such file or directory
原因:见 #151 ,pytorch>=1.11弃用了一些文件,请使用pytorch<=1.10,我用的是1.10.2(和cuda11.3)
题外话:装cuda和pytorch花了很长时间,torch官网没有1.10.2的命令,我尝试装1.10.0和1.10.1,运行detect的时候报错CUDA version (11.3) mismatches the version that was used to compile PyTorch (10.2),最后输入conda install pytorch==1.10.2 torchvision torchaudio cudatoolkit=11.3 装好了(记得换清华源
The text was updated successfully, but these errors were encountered: