How to Check the Python and Anaconda Version

Najwa Riyaz Feb 12, 2024
  1. Use the conda -V Command to Check the Anaconda Version
  2. Use the conda --version Command to Check the Anaconda Version
  3. Using the python -V and python --version Commands to Check the Python Version
  4. Using the conda list anaconda$ Command to Check the Anaconda Version
  5. Use the conda list Command to Check Both the Anaconda and Python Version
  6. Use the conda info Command to Check Anaconda and Python Version
  7. Conclusion
How to Check the Python and Anaconda Version

When working with Anaconda, it is crucial to ensure that you are using the correct versions of both Anaconda and Python for your projects.

This not only ensures compatibility but also helps in avoiding potential issues that may arise due to version mismatches.

In this article, we will explore various methods to check the versions of Anaconda and Python using different commands.

We can use the following commands to determine the Anaconda version on the Anaconda prompt.

  • conda --version
  • conda -V

Similarly, we use the following commands to check the Python version on the Anaconda prompt.

  • python --version
  • python -V

We can also use the following commands to determine both the Anaconda and Python versions on the Anaconda prompt.

  • Use the conda list anaconda$ command.
  • Use the conda list command.
  • Use the conda info command.

Use the conda -V Command to Check the Anaconda Version

The conda -V command is a quick and straightforward way to check the version of Anaconda installed on your system.

On the Anaconda prompt, issue the conda -V command to check the Anaconda version.

Here’s an example.

conda -V

Output:

conda 4.10.1

anaconda check python version - output 1

After a few seconds, the version of the conda will be shown.

Use the conda --version Command to Check the Anaconda Version

Alternatively, you can use the conda --version command to achieve the same result.

Here’s an example.

conda --version

Output:

conda 4.10.1

anaconda check python version - output 2

After a few seconds, the version of the conda will be shown.

Using the python -V and python --version Commands to Check the Python Version

To check the Python version associated with your Anaconda distribution, you can use either the python -V or python --version command. Both commands will yield the same result.

On the Anaconda prompt, issue the python -V or python --version command to check the Python version.

Here’s an example.

python -V
#or
python --version

Output:

Python 3.8.8

anaconda check python version - output 3

After a few seconds, the version of the Python will be shown.

Using the conda list anaconda$ Command to Check the Anaconda Version

If you want to specifically list the version of Anaconda installed on the Anaconda prompt, then issue the conda list anaconda$ command to check the Anaconda version.

Here’s an example.

conda list anaconda$

This command filters the packages with names containing anaconda and displays their versions.

Output:

# packages in environment at C:\Users\UserXYZ\anaconda3:
#
# Name                    Version                   Build  Channel
anaconda                  2021.05                  py38_0

Note: If you have Miniconda installed on your device, it won’t be shown in the list.

Use the conda list Command to Check Both the Anaconda and Python Version

To get a comprehensive list of all installed packages, including Anaconda and Python, you can follow this instruction.

On the Anaconda prompt, issue the conda list command to check the Anaconda and Python versions. Here’s an example.

conda list

It displays all the packages installed in the current environment, amongst which the Anaconda and the Python versions are also listed. It also mentions the Name, Version, Build, and Channel details of the packages.

Output:

# packages in environment at C:\Users\UserXYZ\anaconda3:
#
# Name                    Version                   Build  Channel
 ....
conda                     4.10.1           py38haa95532_1
python                    3.8.8                hdbf39b2_5
 ....

anaconda check python version - output 4

You can see the versions of Anaconda and Python in the generated list.

Use the conda info Command to Check Anaconda and Python Version

For a detailed summary of your Anaconda installation, including both Anaconda and Python versions, on the Anaconda prompt, issue the conda info command.

Here’s an example.

conda info

Output:

active environment : base
         ....
         conda version : 4.10.1
         python version : 3.8.8.final.0
         ....

anaconda check python version - output 5

It displays all the current environment details amongst which the Python and Anaconda version is displayed.

Conclusion

Ensuring the correct versions of Anaconda and Python is paramount for a stable and compatible development environment.

This practice not only guarantees project compatibility but also prevents potential issues resulting from version mismatches.

In this comprehensive guide, we explored various commands to check Anaconda and Python versions on the Anaconda prompt. Whether using conda -V, conda --version, python -V, python --version, conda list, conda list anaconda$, or conda info, developers have a range of options to effortlessly verify their setup, fostering a seamless and error-free development experience.

Always verify and align versions according to project requirements for optimal performance.

Related Article - Python Version