【解决】PyCharm 提示 Cannot find declaration to go to 问题

一、问题描述

Ctrl+左键 不能进入类或方法,提示 Cannot find declaration to go to

Cannot find declaration to go to

二、解决方法

  1. 右键点击左侧文件导航栏整个项目文件夹,然后右击选择 Mark Directory asSources Root

Mark Directory as - Sources Root

  1. 点击 FileSettings 进入设置界面

File - Settings

  1. 在设置界面点击 Python Interpreter<No interpreter>Python 3.9OK 完成

Python Interpreter