If you already know the folder path to the Python file you want to open, skip ahead to opening the file in Command Prompt.

You can copy the location by highlighting it (click and drag your mouse across the “Location” value) and then pressing Ctrl+C.

For example, to open a Python file in a folder named “Files” on your Desktop, you would enter cd desktop/Files here. If you copied the path to the file, you can type in cd and a space and then press Ctrl+V to paste in the path.

For example, if your Python file is named “script”, you would type in python script. py here. If your Python file has one or more spaces in its name, you’ll place quotation marks around the file name and extension (e. g. , python “my script. py”).

If you encounter an error that says ‘python’ is not recognized as an internal or external command after pressing Enter, you’ll need to add Python to the PATH list before retrying this part.

Open File Explorer {“smallUrl”:“https://www. wikihow. com/images/0/04/File_Explorer_Icon. png”,“bigUrl”:"/images/thumb/0/04/File_Explorer_Icon. png/30px-File_Explorer_Icon. png",“smallWidth”:460,“smallHeight”:460,“bigWidth”:30,“bigHeight”:30,“licensing”:"<div class="mw-parser-output">

Original file from Wikipedia: <a target="_blank" rel="nofollow noreferrer noopener" class="external free" href="https://en. wikipedia. org/wiki/File:File_Explorer_Icon. png">https://en. wikipedia. org/wiki/File:File_Explorer_Icon. png</a> The file itself is licensed under the Creative Commons Attribution Share-Alike license, but the icon itself is under copyright by Microsoft. This icon is used on wikiHow as fair use because it is being used to provide how-to instructions. \n</p>

License: <a target="_blank" rel="nofollow noreferrer noopener" class="external text" href="https://en. wikipedia. org/wiki/Fair_use">Fair Use</a> (screenshot)
\n</p></div>"}. Click the View tab. Check the “Hidden items” box.

Click This PC on the left side of the File Explorer. Double-click your hard drive in the “Devices and drives” section. Scroll down and double-click the “Users” folder. Double-click the folder with your username on it. Scroll down and double-click “AppData”. Double-click “Local”. Scroll down and double-click “Programs”. Double-click the “Python” folder. Double-click the Python folder with your preferred version number (e. g. , “Python36”).

You can also press ⊞ Win+X to open the Power User pop-up menu.

You can also press ⊞ Win+X to open the Power User pop-up menu.

You may have to scroll up or down with your mouse cursor hovering over the “User variables” pane to find the “Path” variable.