1. 打开PyCharm并打开项目。
2. 在菜单栏中,选择 "File"(文件)> "Settings"(设置)(在macOS上为 "PyCharm" > "Preferences")。
3. 在设置窗口中,展开 "Project: Your_Project_Name"(项目名称)> "Python Interpreter"(Python解释器)。
4. 选择 "Add Interpreter "->"Add Local Interpreter"。
5. 在打开的对话框中,选择 "Conda Environment"(Conda环境)。
6. 然后,单击文件夹的图标,找到安装Anaconda的文件夹,找到conbat.bat,单击OK
7. 单击Load Environments,然后根据需要选择Use existing environment(使用已经创建的环境)还是Create new environment(创建新环境)
8.单击Apple->OK,大功告成!