opposite of attach project?

已回答

It's convenient to attach another project into the project I'm currently working with (File->open->(select project directory)->click open button, click attach button), but its not clear how to reverse this.  What is the right way to unattach or detach that other project?

I would expect a "detach project" or "close project" option to be right-clickable.  But I've been closing the primary project, renaming the main directory of the attached project, reopening the primary project, then restoring the name of the formerly attached project.  This works, but seems really kludgey.

Is there a better way?

10

PyCharm considers the project that you attach other projects to as the parent project.
If you want to detach the project, then right-click it and choose Remove from Project View.

14

This “Remove from Project View” button appears to no longer exist. The two projects just are displayed as one.  Eventually, I found I had to go to Settings > Project Structure , and remove the Content Roots of the other project to finally get rid of it again.

Previously, I deactivated the dependency on the other project in Settings > Project Dependencies, but I am not sure if the step above requires that. 

```
PyCharm 2025.2.5
Build #PY-252.28238.29, built on November 27, 2025
Source revision: 3c6600c44ee74
Licensed to XXXX
You have a perpetual fallback license for this version.
Subscription is active until XXX.
Runtime version: 21.0.9+10-b1038.76 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.17.11-200.fc42.x86_64
Fedora Linux 42 (Container Image); glibc: 2.41
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 14
Registry:
 ide.experimental.ui=true
Non-Bundled Plugins:
 org.jetbrains.plugins.yaml (252.28238.33)
 com.intellij.copyright (252.28238.33)
 com.github.deeepamin.gitlabciaid (1.14.0)
 Docker (252.28238.33)
 org.jetbrains.plugins.github (252.28238.33-IU)
 org.jetbrains.plugins.gitlab (252.28238.33-IU)
 Subversion (252.28238.33)
Current Desktop: GNOME
```
 

0

Hi Tobias,

This is how it looks like in PyCharm 2025.3.1 and PyCharm 2025.2.6 for me:

As a general troubleshooting step, and to avoid handling issues which are already resolved, please try updating to the latest 2025.3.1 version and check if the issue persists.

If updating doesn't help, please create an issue on YouTrack (https://youtrack.jetbrains.com/issues/PY) and attach all relevant information for quicker resolution.

1

In the Project that I cleaned up previously I tried to attach the other project again to test this once again, but : 

When I click on it, nothing changes. 

So I searched the other project “manually” via the “Open…” button and selected it, but got this error:

I tried to attach the “dev * spline” project to another project, but it did not appear there. 

I attached another project to that project and there I saw that “Remove from project view” item indeed!

I attached another project and took a look at the project structure and there I can see the “invisible” project as well - 3 items in the Project Structure, but only two in the Project overview.

 

 

Update: 

Apparently, the project I tried to attach had no valid content root set. I changed that and then it appeared in the project view. 

0

Tobias, please create an issue on YouTrack: https://youtrack.jetbrains.com/issues/PY

When submitting the report, please include the exact steps to reproduce the problem (along with any relevant project samples) for quicker resolution.

Also, please make sure to attach the IDE logs collected via Help | Collect Logs and Diagnostic Data, so we can check for any possible errors.

0

帖子评论已关闭。