Finding your Anaconda Python interpreter path#
IDEs often require you to specify the path to your Python interpreter. This path varies according to which operating system version and which Anaconda or Miniconda version you use, so you will need to search your file system to find the correct path to your Python interpreter.
You can search for the Python interpreter with your operating system’s file manager, such as File Explorer on Windows, Finder on macOS, or Nautilus on Ubuntu Linux.
You can also use the command line to show the location of the Python interpreter in the active conda environment:
From the Start Menu, open the Anaconda Prompt.
Activate a conda environment that contains an installation of Python by running the following command:
# Replace <ENV_NAME> with the name of the environment conda activate <ENV_NAME>
Locate the Python interpreter by running the following command:
where python
Here is an example command return for user jsmith
running Anaconda3 on Windows 10:
C:\Users\jsmith\Anaconda3\python.exe # Python image in a conda environment called myenv C:\Users\jsmith\Anaconda3\envs\myenv\python.exe
Open a terminal window.
Activate a conda environment that contains an installation of Python by running the following command:
# Replace <ENV_NAME> with the name of the environment conda activate <ENV_NAME>
Locate the Python interpreter by running the following command:
which python
Here is an example command return for user jsmith
running Anaconda on macOS:
~/anaconda/bin/python or /Users/jsmith/anaconda/bin/python
Here is an example command return for user jsmith
running Anaconda on Linux:
~/anaconda/bin/python or /home/jsmith/anaconda/bin/python
Note
Depending on whether you’ve installed Anaconda or Miniconda, the folder in your home directory might be named one of the following:
anaconda
anaconda2
anaconda3
miniconda
miniconda2
miniconda3