python cannot find reference xxx in imported module xxx
解决python问题:python cannot find reference xxx in imported module xxx
解决python cannot find reference xxx in imported module xxx
第一种:File
→ Settings
→ Editor
→ File Types
→ Ignore files and folders
,去掉框框中的:init.py;,然后:OK等待重新文件扫描。
第二种:File
→ Invalidate Caches / Restart
,选择Invalidate and Restart
,等待重新扫描库文件就好了。
其他方式:PyCharm
-> File
-> Settings
-> Build,Excution,Deployment
-> Console
-> Python Console
然后在 Add sources roots to PYTHONPATH
旁边打勾PyCharm
-> File
-> Settings
-> Project(Project : pythonProject)
-> Project Structure
然后选中文件夹右键把Sources
选上
如果仍然存在问题
例如torch_ecg.torch_ecg.错误。这个问题就得看看你这个文件在不在了。重新下载该文件导入即可

GitCode 天启AI是一款由 GitCode 团队打造的智能助手,基于先进的LLM(大语言模型)与多智能体 Agent 技术构建,致力于为用户提供高效、智能、多模态的创作与开发支持。它不仅支持自然语言对话,还具备处理文件、生成 PPT、撰写分析报告、开发 Web 应用等多项能力,真正做到“一句话,让 Al帮你完成复杂任务”。
更多推荐
所有评论(0)