Renaming PyCharm project does not change name at top of window

In PyCharm, I can refactor the project by right clicking on it in the menu on the left. However, this does not change the name in the blue bar right at the top of the PyCharm window, where it also shows the project path on your machine. Why not?


The UI doesn't seem to set the configuration files correctly. It is probably a bug.

If you edit: <projectdir>/.idea/.name you can set the name there.

You will have to restart PyCharm for this to take effect.


Today I have reached the same problem. I tried this answer, but I have not found this <projectdir>/.idea/.name.

So I renamed the <projectdir>/.idea/<projectName>.iml, but I realized that this is not enough.

For fully working solution I had to:

  1. Change name of projectdir
  2. Rename the <projectdir>/.idea/<projectName>.iml file
  3. Rebuild virtualenv (because I used it on this module)
  4. Change all paths to file <projectName>.iml and virtualenv directory (in my case: ) inside each xml file on folder .idea (In my case was files name: modules.xml and workspace.xml -> that is mine home directory for all projects)
  5. Change name of module (projectName) inside xml file (in my case: workspace.xml) on each that line contain:

    • <favorites_list name="<projectName>" />

    • <option name="myItemId" value="<projectName>" />

    • <module name="<projectName>" />

    • <ignored path="<projectName>.iws" /> -> but I am not 100% sure about this one.

  6. And finally restart pyCharm and set current virtualenv as Python Interpretor

For Info: I am working on pyCharm Community Edition 2016.2 and Ubuntu 16.04 LTS.

If someone knows easier way, please feel free to inform me.


I came also across this problem and the solution is much much much much (and many more 'much' ) simpler.

The menu at the top right is a menu of the run configurations. Upon renaming the file and if the file has been run/debuged previously, there is a case where the run configuration is not updated.

To correct this, expand the menu just at the left of the 'Play' button at the top right and select 'Edit Configurations'.

From there, find the configuration that you want by selecting it from the menu at the left. At the right pane, at the top, there is the field 'Name'. You can change the content of that field to the new name of the script and you are done.

For example:

Lets say that I have the script foo.py and I rename it to bar.py. At the top right of the PyCharm, there is the 'foo' at the immediate left of the 'Play' button.

I expand the menu at the immediate left of the play button and I choose the 'Edit configurations' choice. Then, I choose foo from the left pane. At the right pane, at the top, and in the field 'Name' I enter 'bar'.

Now, when I want to run the bar.py, the configuration bar will be run.


I had the same problem and solved it by doing:

  1. Edit the name of <projectdir>/.idea/<projectName>.lml to match the project name
  2. Change the name of .lml file in the <projectdir>/.idea/modules.xml file.
  3. Restart PyCharm