Python 如何删除 PyCharm 中的项目?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20839182/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to remove project in PyCharm?
提问by user1685095
If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again.
如果我要关闭一个项目,然后只是删除项目文件夹,则在 PyCharm 重新启动后,将再次创建一个空项目文件夹。
采纳答案by TheCatParty
Just follow these steps in order. They assume you currently have the project open in a PyCharm window:
只需按顺序执行这些步骤。他们假设您当前在 PyCharm 窗口中打开了项目:
- Close your project by clicking on File -> Close Project
- Locate your project in the PyCharm file directory
- Delete your project's directory
- 通过单击文件 -> 关闭项目关闭您的项目
- 在 PyCharm 文件目录中找到您的项目
- 删除你的项目目录
I agree that PyCharm's handling of what should be a very simple procedure is crappy. Maybe this will be improved in the future?
我同意 PyCharm 对应该是一个非常简单的程序的处理是糟糕的。也许这会在未来得到改善?
回答by winblood
If you want to remove the project from the recent projects list, just highlight the project with your mouse and hit the del key.
如果您想从最近的项目列表中删除该项目,只需用鼠标突出显示该项目并按 del 键即可。
回答by Yang Wang
Highlight the project with your mouse and hit the del key, which works for me.
用鼠标突出显示项目,然后按 del 键,这对我有用。
回答by Nan Zhou
In version 2017.2.1
在 2017.2.1 版本中
File -> close project
文件 -> 关闭项目
You will be taken to the start up window, where you can see the projects you've created on the left. You can then delete a project by clicking the cross sign('x') following the project name.
您将被带到启动窗口,在那里您可以在左侧看到您创建的项目。然后,您可以通过单击项目名称后面的叉号 ('x') 来删除项目。
回答by gamliela
Version 2017.2.1
版本 2017.2.1
- Press Alt+1 to bring the project pane, and make sure you're in Projectview (not Project Filesview).
- Select the desired project, and choose "Delete from project view" from the context menu (right click). You can also use Delete key.
- 按 Alt+1 调出项目窗格,并确保您处于 项目视图(而不是项目文件视图)中。
- 选择所需的项目,然后从上下文菜单中选择“从项目视图中删除”(右键单击)。您也可以使用删除键。
回答by ssoto
I had the same issue. My solution was:
我遇到过同样的问题。我的解决方案是:
- Close project.
- Rename the folder you want to dissapear
- Open pycharm project. A dialog will be shown asking if you want Pycharm remove the folder. Answer: yes.
- 关闭项目。
- 重命名要消失的文件夹
- 打开 pycharm 项目。将显示一个对话框,询问您是否希望 Pycharm 删除该文件夹。回答:是的。
That is enough.
足够了。
回答by Simin Jie
Works for Windows and MacOS.
适用于 Windows 和 MacOS。
According to https://www.youtube.com/watch?v=ksbmc0coO4k
回答by ZhangXu
- click the project you want to remove.
- menu bar Edit-> Remove from Project View.
- 单击要删除的项目。
- 菜单栏编辑-> 从项目视图中删除。
回答by David Dehghan
In PyCharm 2018 I finally had to resort to deleting .idea folder and the project went away.
在 PyCharm 2018 中,我终于不得不删除 .idea 文件夹,项目就消失了。
回答by lmiguelvargasf
This is for PyCharm 2019.1, but I can bet this will work in previous versions.
这是针对PyCharm 2019.1 的,但我敢打赌这将适用于以前的版本。
I am assuming you are in a Unix based operating system (macOs or any Linux distribution). I am also assuming you have currently opened the project you want to remove.
我假设您使用的是基于 Unix 的操作系统(macOs 或任何 Linux 发行版)。我还假设您当前已打开要删除的项目。
- Close the project by going to
File -> Close Project
- 通过转到关闭项目
File -> Close Project
- Remove the project from Pycharm's Welcome Window
- 从 Pycharm 的欢迎窗口中删除项目
- Locate your project and delete it, you can use several alternatives, but I encourage you to use the following
- 找到您的项目并删除它,您可以使用多种替代方法,但我鼓励您使用以下方法
$ rm -rf /path/to/your/project/directory
The previous command will work in macOS and Linux. In Windows, you can delete it manually by locating the projects directory using File Explorer.
前面的命令适用于 macOS 和 Linux。在 Windows 中,您可以通过使用文件资源管理器找到项目目录来手动删除它。
That's it, the project has been completely deleted!
就是这样,项目被彻底删除了!


