Turn PyCharm package back to a directory in Project Tool Window

Question:

I don’t know how it happened, but a normal PyCharm directory turned into a package that doesn’t contain __init__.py

enter image description here

I have tried to import functions from that directory before, could this have caused the problem? (Now I don’t import anything from that directory, but it is still a package with a dot) How can I turn it back to a standard directory again? I have tried to add a init.py file and delete it, but it didn’t work.

Asked By: start programming

||

Answers:

Right click the folder -> Mark directory as -> Unmark as Namespace Package.

Answered By: 101
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.