当前位置:网站首页>运行时候的导包搜索路径虽然pycharm中标红但不影响程序的执行
运行时候的导包搜索路径虽然pycharm中标红但不影响程序的执行
2022-07-01 05:33:00 【火星种萝卜】
在pycharm 中报如下包找不到from models.yolo_layer import YoloLayer,但是该行的前面已经导入了搜包的路径,运行时并不报错,只是pycharm在分析静态代码结构层面会标红提示找不到包 import os import sys PACKAGE_PARENT = '..' SCRIPT_DIR = os.path.dirname(os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__)))) sys.path.append(os.path.normpath(os.path.join(SCRIPT_DIR, PACKAGE_PARENT))) from models.yolo_layer import YoloLayer from models.darknet_utils import parse_cfg, print_cfg, load_fc, load_conv_bn, load_conv from utils.torch_utils import to_cpu
边栏推荐
- Youqitong [vip] v3.7.2022.0106 official January 22 Edition
- HDU - 1069 Monkey and Banana(DP+LIS)
- Multi table operation - foreign key cascade operation
- Data governance: metadata management implementation (Part IV)
- Idea start view project port
- Is it safe for a novice to open a securities account?
- HDU - 1024 Max Sum Plus Plus(DP)
- Vmware workstation network card settings and three common network modes
- [SRS] use of Vhost isolated stream: push / pull Stream Address
- HDU - 1069 Monkey and Banana(DP+LIS)
猜你喜欢

Deeply understand the underlying implementation principle of countdownlatch in concurrent programming
![[RootersCTF2019]babyWeb](/img/b4/aa8f8e107a9dacbace72d4717b1834.png)
[RootersCTF2019]babyWeb

Basic electrician knowledge 100 questions

基于微信小程序的青少年生理健康知识小助手(免费获取源码+项目介绍+运行介绍+运行截图+论文)

Actual combat: gateway api-2022.2.13

小程序常用组件小结

Summary of common components of applet

Daily code 300 lines learning notes day 11

在Rainbond中一键部署高可用 EMQX 集群

CockroachDB: The Resilient Geo-Distributed SQL Database 论文阅读笔记
随机推荐
Ssm+mysql second-hand trading website (thesis + source code access link)
在Rainbond中一键部署高可用 EMQX 集群
Flowable source code comment (XXXIX) task listener
Youqitong [vip] v3.7.2022.0106 official January 22 Edition
基于微信小程序的青少年生理健康知识小助手(免费获取源码+项目介绍+运行介绍+运行截图+论文)
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
Unity project experience summary
JDBC common interview questions
Rainbow combines neuvector to practice container safety management
Mathematical knowledge: finding the number of divisors
[Yugong series] February 2022 Net architecture class 005 ABP vNext Net core web application getting started configuration
小程序常用组件小结
Using nocalhost to develop microservice application on rainbow
第05天-文件操作函数
Rust hello-word
Fiber Bragg grating (FBG) notes [1]: waveguide structure and Bragg wavelength derivation
Trust guessing numbers game
More than one file was found with OS independent path ‘lib/armeabi-v7a/libyuv.so‘.
Flutter 实现每次进来界面都刷新数据
【QT】qt加减乘除之后,保留小数点后两位