Skip to content

Python Interpreter Setting

Overview

Setting Python at the first place is always hard, especially if you first meet Python.

This document make sure the way you interact with Python on Windows (this is most cases) for Python developers to start develop.

Progress

Choose one of following sections to follow.

  1. Download a Python release at Official Python Download
  1. Setting PATH, required admin previledges in your laptop/computer

  2. [Optional] If you using VSCode (Coding IDE), must read through [VSC Python tutorial]https://code.visualstudio.com/docs/python/python-tutorial)

  3. Then, setting Interpreter by using Ctrl+Shift+P then typing Python: Select Interpreter and choose the Path

Troubleshooting

CMD opens Windows Store when I type 'python'

Action: Use the Windows search bar to find "Manage app execution aliases". There should be two aliases for Python. Unselect them, and this will allow the usual Python aliases "python" and "python3". See the image below.

Ref:

Setting PATH for Python

Using this keyword How to set the path and environment variables in Windows to search and there are a lot of suggestion tutorial to follow

Use one of download method

If you using Python Launcher for Windows, it settings differents Python path on your machine.

Even you setting the PATH, the Python still not change to the want Python version

Check if

which py
# yield C/windows/py

This is time you make sure to use one method only.

If you want to select the options, removed the Launcher in Control Panel > Programs > Uninstall ... progress.

There is required to refresh your machine after this to refresh session

Reference