Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to go to import in PyCharm?

Tags:

pycharm

Is there a shortcut in PyCharm to go to the place where a symbol is imported in current module?

I tried "Go To Declaration" but it goes to another module.

like image 989
utapyngo Avatar asked Apr 14 '14 04:04

utapyngo


People also ask

How do I import a Python module into PyCharm?

Since I logically assume you are programming in python using Pycharm as your IDE, you'll just do the stand “import module” or “from module import blah” PyCharm is simply an ide which uses whatever installation of Python you have - including any virtual environments you might have created.

What is PyCharm and how to use it?

no - PyCharm is an IDE - Integrated Development Environment; essentially it is fully featured application comprising of file editors, project explorers, debuggers and much else. It’s intention is assist the developer in writing code.

Why can't I install a library in PyCharm?

you have a typo. You have installed the library but you have PyCharm configured to the wrong environment /interpreter - libraries are per interpreter so if you have virtual environments you have to install the library into the right one.

How do I use PyCharm with virtualenv?

It’s installed in your virtualenv, you just need to import it. So away you go, up to the top of the file, looking for the right place to manually import it. Instead, let PyCharm do it for you. Start typing part of requests and type Ctrl-Space-Space.


1 Answers

Here is the answer from JetBrains support:

Try to use a shortcut for "Find Usages in current file": https://www.jetbrains.com/help/pycharm/finding-usages-in-the-current-file.html


To find usages of a symbol in the current file

  1. Click the desired symbol in the editor, or in the Structure view.
  2. On the main menu, choose Edit | Find | Find Usages in File, or press Ctrl+F7. The encountered usage is highlighted in the editor.
like image 153
utapyngo Avatar answered Oct 08 '22 19:10

utapyngo