1

I have a line in my code at the top of a python file before the class def:

import DataManagement.game_start_manager as game_start_manager_

I write my Python in Visual Studio 2019 because by trade I'm a C# developer so I had it already. I was looking at moving to PyCharm for Python coding so as to be more alligned with the Python world.

The code above works fine in Visual Studion, however, in PyCharm I am being told that there is "No Module" named DataManagement.

In my folder structure DataManagement is the name of a folder and game_start_manager is the name of a file: game_start_manager.py which contains a class: GameStartManager.

The code shown above is in a separate folder (Main/start_up.py) at the same level:

i.e.

  • Main
    • start_up.py
  • DataManagement
    • game_start_manager.py

Visual Studio seems to treat folders and (I think) files as Modules whereas PyCharm does not?

My concern is that I am misunderstanding a fundemental idea surrounding Modules in Python and that is leading to my problem.

What is the cause of the mismatch between my code evaluation in VS 2019 and PyCharm?

yole
  • 92,896
  • 20
  • 260
  • 197
Richard210363
  • 8,342
  • 6
  • 37
  • 63

0 Answers0