The location of the third-party package and python compiler in the anaconda virtual environment in Macos and Windows

Use an article to explain all the locations of third-party packages and python compilers in anaconda , and never get lost!

1. The location of the third-party package

When using anaconda, sometimes you need to add packages manually. The location of third-party packages in windows and macos is different~.

The site-packages folder is where the third-party package is installed. After copying and pasting the downloaded package into it, you can import and use it!

1.1 windows operating system

1.1.1 The location of third-party packages in the basic environment (base)

anaconda/Lib/site-packages

1.1.2 The location of third-party packages in the virtual environment

anaconda/envs/environment name/Lib/site-packages

 Windows is easy to find, first find the installation directory of anaconda, here my virtual environment name is pytorch, so the picture shows pytorch.

1.2 MACOS operating system

The location of the third-party package of anaconda under MACOS is different from that of windows.

1.2.1 The location of third-party packages in the basic environment (base)

anaconda/lib/python compiler version/site-packages

1.2.2 The location of third-party packages in the virtual environment

anaconda/envs/environment name/lib/python compiler version/site-packages

First find your anaconda installation directory.

The name of the environment I created here is pytorch, and the compiler is python3.9. So the picture shows pytorch and python3.9, these two places can be modified according to the environment you build yourself.

2. The location of the compiler

When using pycharm to configure the anaconda compiler, the position of the interpreter needs to select the compiler in the corresponding environment. Here, it is also explained by two operating systems, windows and macos.

2.1 windows operating system

2.1.1 The location of the compiler in the base environment (base)

anaconda/python.exe

2.1.2 The location of the compiler in the virtual environment

anaconda/envs/environment name/python.exe

2.2 MacOS operating system

2.2.1 The location of the compiler in the base environment (base)

same as windows

2.2.2 The location of the compiler in the virtual environment

anaconda/envs/environment name/bin/python.exe

Guess you like

Origin blog.csdn.net/tortorish/article/details/126108415