Pycharm - 找不到要前往的声明 [英] Pycharm - Cannot find declaration to go to

查看:200
本文介绍了Pycharm - 找不到要前往的声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将项目代码从 python 2.7 更改为 3.x.

I changed my project code from python 2.7 to 3.x.

在这些更改之后,当将鼠标悬停在任何方法上并按 ctrl 时,我会收到一条消息找不到要转到的声明"

After these changes i get a message "cannot find declaration to go to" when hover over any method and press ctrl

我正在尝试将 pycharm 从 2017.3 更新到 18.1,删除目录 .idea 但我的问题仍然存在.

I'm tryinig update pycharm from 2017.3 to 18.1, remove directory .idea but my issue still exist.

你知道我该如何解决它吗?

Do you have any idea how can i fix it?

推荐答案

在你认为相关代码所在的文件夹上右击->Mark Directory as->Sources Root

Right click on the folders where you believe relevant code is located ->Mark Directory as-> Sources Root

请注意,菜单中的Sources Root"措辞具有误导性:索引过程不是递归的.您需要标记所有相关文件夹.

Note that the menu's wording "Sources Root" is misleading: the indexing process is not recursive. You need to mark all the relevant folders.

这篇关于Pycharm - 找不到要前往的声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆