当前位置:网站首页>运行时候的导包搜索路径虽然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
边栏推荐
- boot+jsp的高校社團管理系統(附源碼下載鏈接)
- json数据比较器
- Leetcode top 100 questions 1 Sum of two numbers
- Mathematical knowledge: finding the number of divisors
- Daily code 300 lines learning notes day 11
- 【QT】qt加减乘除之后,保留小数点后两位
- Unity project experience summary
- Wild melon or split melon?
- Causes of short circuit of conductive slip ring and Countermeasures
- Use and principle of AQS related implementation classes
猜你喜欢

导电滑环使用的注意事项

Use and principle of wait notify

Use and principle of Park unpark
![Is there any good website or software for learning programming? [introduction to programming]?](/img/ae/68a5880f313c307880ac80bd200530.jpg)
Is there any good website or software for learning programming? [introduction to programming]?

How to meet the requirements of source code confidentiality and source code security management

教务管理系统(免费源码获取)

了解 JVM 中几个相关问题 — JVM 内存布局、类加载机制、垃圾回收

Rainbow combines neuvector to practice container safety management

Learn the customization and testing of fpga---ram IP from the bottom structure

Trust guessing numbers game
随机推荐
Idea start view project port
实战:redux的基本使用
教务管理系统(免费源码获取)
2/15 (awk, awk conditions, awk processing design can perform additional tasks, and use awk array +for loop to realize advanced search)
Programmers dig "holes" to get rich: if they find a loophole, they will be rewarded 12.72 million yuan
Use and principle of wait notify
Introduction of 3D Modeling and Processing Software Liu Ligang, Chinese University of Science and Technology
busybox生成的东西
提高企业产品交付效率系列(1)—— 企业应用一键安装和升级
SSGSSRCSR区别
小程序常用组件小结
boot+jsp的高校社團管理系統(附源碼下載鏈接)
Unity uses SQLite
Leetcode top 100 question 2 Add two numbers
CockroachDB 分布式事务源码分析之 TxnCoordSender
Using nocalhost to develop microservice application on rainbow
[SRS] use of Vhost isolated stream: push / pull Stream Address
LevelDB源码分析之memtable
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
TypeORM 框架