ImportError: No module named bbox #395, cython存在时需要编译

本文详细介绍了如何解决RCNN项目中Cython文件的编译问题,特别是在Python2和Python3版本冲突的情况下,提供了具体的解决方案,包括使用正确的Python版本进行编译,并确保在Linux环境下完成编译过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

rcnn调用的cython,cython需要编译

I just find my command python use python3, but my project use python2.
So, I make it with python2 setup.py build_ext --inplace again.

So the problem was solved.

 

You can also enter the folder where the Cython files are placed and simply run:
python setup.py build_ext --inplace

make sure the setup.py is in the folder.

 

还需要在linux环境编译!!!!!!!不然win10报错:

  File "setup.py", line 115, in build_extensions
    customize_compiler_for_nvcc(self.compiler)
  File "setup.py", line 88, in customize_compiler_for_nvcc
    default_compiler_so = self.compiler_so
AttributeError: MSVCCompiler instance has no attribute 'compiler_so'
 

train: weights=weight\yolov5s.pt, cfg=D:\project\py\YOLOpythonProject1\yolov5\models\mym.yaml, data=data.yaml, hyp=data\hyps\hyp.scratch-low.yaml, epochs=100, batch_size=-1, imgsz=640, rect=False, resume=False, nosave=False, noval=False, noautoanchor=False, noplots=False, evolve=None, evolve_population=data\hyps, resume_evolve=None, bucket=, cache=None, image_weights=False, device=0, multi_scale=False, single_cls=False, optimizer=SGD, sync_bn=False, workers=8, project=runs\train, name=exp, exist_ok=False, quad=False, cos_lr=False, label_smoothing=0.0, patience=100, freeze=[0], save_period=-1, seed=0, local_rank=-1, entity=None, upload_dataset=False, bbox_interval=-1, artifact_alias=latest, ndjson_console=False, ndjson_file=False YOLOv5 2025-3-14 Python-3.10.6 torch-2.6.0+cu126 CUDA:0 (NVIDIA GeForce RTX 3050 Ti Laptop GPU, 4096MiB) hyperparameters: lr0=0.01, lrf=0.01, momentum=0.937, weight_decay=0.0005, warmup_epochs=3.0, warmup_momentum=0.8, warmup_bias_lr=0.1, box=0.05, cls=0.5, cls_pw=1.0, obj=1.0, obj_pw=1.0, iou_t=0.2, anchor_t=4.0, fl_gamma=0.0, hsv_h=0.015, hsv_s=0.7, hsv_v=0.4, degrees=0.0, translate=0.1, scale=0.5, shear=0.0, perspective=0.0, flipud=0.0, fliplr=0.5, mosaic=1.0, mixup=0.0, copy_paste=0.0 TensorBoard: Start with &#39;tensorboard --logdir runs\train&#39;, view at http://localhost:6006/ COMET WARNING: Comet credentials have not been set. Comet will default to offline logging. Please set your credentials to enable online logging. COMET INFO: Using &#39;D:\\project\\py\\YOLOpythonProject1\\yolov5\\.cometml-runs&#39; path as offline directory. Pass &#39;offline_directory&#39; parameter into constructor or set the &#39;COMET_OFFLINE_DIRECTORY&#39; environment variable to manually choose where to store offline experiment archives. Traceback (most recent call last): File "D:\project\py\YOLOpythonProject1\yolov5\train.py", line 986, in <module> main(opt) File "D:\project\py\YOLOpythonProject1\yolov5\train.py", line 688, in main train(opt.hyp, opt, device, callbacks)
最新发布
04-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值