Setting anaconda Python as the default

Just documenting a quick note for me to refer back later.

Problem

When I was trying to check the AWS CLI version on my terminal, I get this warning in return:

which made me go: “Hang on, pretty sure I have anaconda installed”.

It must…


This content originally appeared on DEV Community and was authored by vindianadoan

Just documenting a quick note for me to refer back later.

Problem

When I was trying to check the AWS CLI version on my terminal, I get this warning in return:

Image description
which made me go: "Hang on, pretty sure I have anaconda installed".

It must be because when I was installing anaconda, I didn't pick the setting so that Python is added to the environment.

How to Fix It

Method 1: Run Command Prompt as Administrator:

Type the following commands, substituting the path to your Anaconda Python:

assoc .py=Python.File
ftype Python.File="C:\Users\YourName\anaconda3\python.exe" "%1" %*

These commands tell Windows to associate .py with a “Python.File” type, and then map “Python.File” to your Anaconda Python executable.

Method 2: Use the Windows Default Apps Settings (No Admin Required):

  • Open Settings → Apps → Default apps.
  • Click Choose default apps by file type and scroll to .py.
  • Select the current default app (or “No default”) and browse to your Python interpreter (e.g. C:\Users\YourName\anaconda3\python.exe).

Now it's gone.

Image description


This content originally appeared on DEV Community and was authored by vindianadoan


Print Share Comment Cite Upload Translate Updates
APA

vindianadoan | Sciencx (2025-03-12T01:42:52+00:00) Setting anaconda Python as the default. Retrieved from https://www.scien.cx/2025/03/12/setting-anaconda-python-as-the-default/

MLA
" » Setting anaconda Python as the default." vindianadoan | Sciencx - Wednesday March 12, 2025, https://www.scien.cx/2025/03/12/setting-anaconda-python-as-the-default/
HARVARD
vindianadoan | Sciencx Wednesday March 12, 2025 » Setting anaconda Python as the default., viewed ,<https://www.scien.cx/2025/03/12/setting-anaconda-python-as-the-default/>
VANCOUVER
vindianadoan | Sciencx - » Setting anaconda Python as the default. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/03/12/setting-anaconda-python-as-the-default/
CHICAGO
" » Setting anaconda Python as the default." vindianadoan | Sciencx - Accessed . https://www.scien.cx/2025/03/12/setting-anaconda-python-as-the-default/
IEEE
" » Setting anaconda Python as the default." vindianadoan | Sciencx [Online]. Available: https://www.scien.cx/2025/03/12/setting-anaconda-python-as-the-default/. [Accessed: ]
rf:citation
» Setting anaconda Python as the default | vindianadoan | Sciencx | https://www.scien.cx/2025/03/12/setting-anaconda-python-as-the-default/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.