I've started with a python project in PyCharm (2023.2.1 Community Edition) with only one module/project to which I have added another project that sits at the same level as the first project in the project exlorer. It is meant to work independently of the first one.
The problem I'm facing: I cannot use Python builtin-functions in Project 2, specifically open(), I get an error message: ModuleNotFoundError: No module named 'module1' with module1 being a source folder in the first project.
What I've tried:
- Mark a folder in the new project as source folder and add an
__init__.pyfile. I understood this is the way builtin functions can be called. - Promote the new project repository standalone project status by going File > Close Project and reopen. Under settings, I now see Project: Name_Of_New_Project.
- Edit File > Settings Project Structure. Make sure the source folders a listet.
Running the code, I still get ModuleNotFoundError: No module named 'module1'. I cannot even locate where module1 is specified so I can edit it. Anyone knows what to do?