Use Anaconda in Pycharm to create an independent environment and configure it

  1. Install Anaconda

First, make sure you have successfully installed Anaconda on your system. You can download the Anaconda installer for Windows from the official Anaconda website ( https://www.anaconda.com/products/individual) and follow the instructions to install it.

  1. Use Anaconda to create a python interpreter environment

1) Method 1: Use the interface tool, Anaconda Navigator

  • Open Anaconda Navigator. It is a graphical user interface for managing Anaconda environments and packages. Create a separate environment:

  • In Anaconda Navigator, select the "Environments" tab. Then click the "Create" button, enter the environment name and select the desired Python version.

  • To install the required third-party packages, under the created environment, select the "Install" tab. Enter the names of the packages you want to install in the search box and select them for installation. You can choose to install commonly used scientific computing packages, such as NumPy, Pandas, Matplotlib, etc.

2) Method 2: Using the command line, Anaconda Prompt

Refer to the command line method to create the environment:

https://blog.csdn.net/anonymous_me/article/details/129201213

  1. Open PyCharm and configure the interpreter

Open the PyCharm Integrated Development Environment (IDE). Select File > Settings from the main menu.

configure interpreter

In the settings window, expand the "Project" option and select "Python Interpreter". Click the gear icon in the upper right corner and select "Add".

  1. Select interpreter type

In the dialog that pops up, select "Conda Environment" and then select "Existing environment".

  1. Configure the environment path

Click the "..." button, find and select the independent environment folder created in the Anaconda installation directory in the pop-up dialog box.

  1. apply changes

Click "OK" and then click the "Apply" button to apply the changes.

Now, you have successfully configured PyCharm to use the isolated environment created by Anaconda. In the project, you can choose to use this environment as the project's Python interpreter, and use this environment to install and manage packages in PyCharm.

Supongo que te gusta

Origin blog.csdn.net/anonymous_me/article/details/129201034
Recomendado
Clasificación