The PyCharm documentation (2023.1.3 community) says that if you select ‘attach’ when opening project B within already opened project A, you are creating a dependency of A on B and you will be able to use code from B. But this does not seem to work.
In my setup, I have project ‘emailgen’ already opened. I go ‘File > Open’ and find the project ‘nlp-communal’, then selected ‘Attach’. Now I have the view of both projects, their structures are shown below.
Now say within ‘emailgen' I have ai.emailgen.autocompose.autocompose.py and I want to use code from ‘nlp-communal’ within this file. I tried to type an import statement as ‘from ai.common….’, but this does not get recognised. As you can say, the pop-up suggestion does not show ai.common…. if I force it by typing the full module path and run the code, I get an error saying that the module and package does not exist.