Import modules into Pycharm

Asked

Viewed 3,068 times

1

I’m trying to import modules into Pycharm:

from mymodule import fileHandler

However, the IDLE error ImportError: cannot import name FileHandle

I have tried to follow the most common suggestions:

  1. Identify the root folder as src;

  2. Add to PYTHONPATH the sources of the previous step.

and none worked

  • In case this module is yours right?

  • Yes, the modules I care about are mine.

  • you are using IDLE or Pycharm?

  • Pycharm. You were supposed to write IDE

1 answer

2

Where the projects are located, right-click "Mark directory as..." after "Sources Root"

inserir a descrição da imagem aqui

  • By "where are the projects" you say to click on the project name?

  • This, in the folder with the Project name.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.