Project Structure

I have imported a project into PyCharm that was created in IntelliJ using the Python plugin. In IntelliJ's Project Structure dialog, I was able to 'create' separate modules and specify the dependency relationships between the modules.

Now in PyCharm's Project Structure dialog, I see my individual modules that were created in IntelliJ, but:
1) don't see anyway to create a new module
2) don't see anyway to specify module dependencies

Is there a blog post (or other information) somewhere that talks about how to organize a large Python code base as a PyCharm project?
3 comments
Comment actions Permalink
PyCharm's project structure dialog is intentionally more limited than that of IntelliJ IDEA. Since the Python ecosystem does not generally use the concept of multi-module projects and module dependencies, we didn't include these concepts in PyCharm's UI.

When you open a project in PyCharm and select the option to attach it to the currently opened projects, it works as an equivalent of adding a new module to a project in IntelliJ IDEA. UI for configuring dependencies between multiple opened projects is planned for addition in PyCharm 2.7.
0
Comment actions Permalink
Hi,

I'm having a similar problem. I've organized my packages into a single directory and this directory is in PYTHONPATH. I can now call packages from any terminal prompt location and the packages import other packages using near absolute references like "from utilities.utilities import sometool"

But PyCharm debugger fails on trying to import utilities.

So I added utilities package to other open package as suggested above but this did not work. I had to remove the first "utilities" from "utilities.utilities" but when I make that change the main package no longer loads at the terminal prompt due to missing "utilities."

I can debug or I can run the package but not both it seems. Is there another option while waiting for PC 2.7?
0
Comment actions Permalink
Hum, I enclosed the different imports in "try" statements and that now works for both situations. Is this the best approach until 2.7?
0

Please sign in to leave a comment.