Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming PyCharm project does not change name at top of window

Tags:

python

pycharm

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?

like image 775
Karnivaurus Avatar asked Nov 12 '14 19:11

Karnivaurus


People also ask

How do I rename a project in PyCharm?

Renaming ProjectsRight-click the root folder of your project and select Refactor | Rename from the context menu or press Shift+F6 . In the dialog that opens, choose the rename strategy. If the project name is the same as the name of its root folder, select Rename directory.

How do I change the project directory in PyCharm?

Open the Project Structure settings. In the Projects pane of the Project Structure page, click the project you want to configure content roots for. In the dialog that opens, locate the desired directory and click OK.


1 Answers

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.

like image 64
dannydedog Avatar answered Nov 15 '22 22:11

dannydedog