PyCharm current working directory

I have Pycharm 4.5, so things might have changed a bit.

Try going to Settings > Project > Project Structure

On this dialog, click your folder that has the source code in it, and then click the blue folder in the menu to note it as "source" folder. I believe this fixes a lot of the path issues in Pycharm

Here is the link to "content roots": https://www.jetbrains.com/pycharm/help/content-root.html


Change: Run > Edit Configurations > Working directory, which sets the working directory for a specific project. (This is on a Mac)


Current version 2019.2 somehow ignores "source root" from the "project structure". Here's how to actually enforce it:

Run -> Edit Configurations -> Python -> "Edit Templates" this buttin -> fill out "Working Directory"