If you’re using Linux, use your distribution’s package manager to install the latest version of Python 3 and then move to Step 2. If you’re using Windows or macOS, keep reading. Go to https://www. python. org/downloads. Click the Downloads link at the top of the page and select your operating system. Click the Latest Python 3 Release link at the top of the page. Scroll to the “Files” section at the bottom of the page. If you’re using a Mac, click the macOS 64-bit installer link. If you’re using Windows, click the Windows x86-64 executable installer link. Once the download is complete, double-click the installer (it has a name like python-3. 8. 3-macOS10. 9. pkg/exe) and follow the on-screen instructions to install. If you’re using Windows, make sure you choose the option to install IDLE when prompted. [1] X Research source
If you want to execute the Python script, continue to the next step. Otherwise, feel free to edit the script as needed in IDLE.
See Step 1 of the Using IDLE method for installation instructions. If you’re using Linux, you may already have Python 3 installed. If not, use your distribution’s package manager to get the latest version. [2] X Research source
Mac: Open Finder, and then navigate to Applications > Utilities. Double-click Terminal in the list. Windows: Type command prompt into the Windows search bar, and then click Command Prompt in the search results. Linux: Press the Control + Alt + T keys, or click the Terminal icon on your desktop.
For example, if you’re using a Mac and your . py file is on the desktop, you’d type cd ~Desktop and press the Return key. If you’re using Windows and your . py file is in your Documents folder, type cd Documents and press Enter. Or, if you’re not already in your user directory, use the full path (cd C:\Users\Yourname\Documents) instead.
If you’re using Linux or macOS and have an older version of Python installed, try using python3
See Step 1 of the Using IDLE method for installation instructions.
You can also open Python Launcher first and drag the Python script to the application window. You’ll find Python Launcher in the Applications folder on a Mac, and in the Start menu on Windows.