Pycharm - Cannot find declaration to go to(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 - 找不到要前往的声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Pycharm - 找不到要前往的声明
基础教程推荐
- matplotlib 设置 yaxis 标签大小 2022-01-01
- Kivy 使用 opencv.调整图像大小 2022-01-01
- Python,确定字符串是否应转换为 Int 或 Float 2022-01-01
- 在 Python 中将货币解析为数字 2022-01-01
- Python 中是否有任何支持将长字符串转储为块文字或折叠块的 yaml 库? 2022-01-01
- kivy 应用程序中的一个简单网页作为小部件 2022-01-01
- 究竟什么是“容器"?在蟒蛇?(以及所有的 python 容器类型是什么?) 2022-01-01
- 比较两个文本文件以找出差异并将它们输出到新的文本文件 2022-01-01
- 对多索引数据帧的列进行排序 2022-01-01
- 在 Django Admin 中使用内联 OneToOneField 2022-01-01
