Version | Operating System | Description | MD5 Sum | File Size | GPG |
---|---|---|---|---|---|
Gzipped source tarball | Source release | 41b6595deb4147a1ed517a7d9a580271 | 22745726 | SIG | |
XZ compressed source tarball | Source release | eb8c2a6b1447d50813c02714af4681f3 | 16922100 | SIG | |
macOS 64-bit/32-bit installer | Mac OS X | for Mac OS X 10.6 and later | ca3eb84092d0ff6d02e42f63a734338e | 34274481 | SIG |
macOS 64-bit installer | Mac OS X | for OS X 10.9 and later | ae0717a02efea3b0eb34aadc680dc498 | 27651276 | SIG |
Windows help file | Windows | 46562af86c2049dd0cc7680348180dca | 8547689 | SIG | |
Windows x86-64 embeddable zip file | Windows | for AMD64/EM64T/x64 | cb8b4f0d979a36258f73ed541def10a5 | 6946082 | SIG |
Windows x86-64 executable installer | Windows | for AMD64/EM64T/x64 | 531c3fc821ce0a4107b6d2c6a129be3e | 26262280 | SIG |
Windows x86-64 web-based installer | Windows | for AMD64/EM64T/x64 | 3cfdaf4c8d3b0475aaec12ba402d04d2 | 1327160 | SIG |
Windows x86 embeddable zip file | Windows | ed9a1c028c1e99f5323b9c20723d7d6f | 6395982 | SIG | |
Windows x86 executable installer | Windows | ebb6444c284c1447e902e87381afeff0 | 25506832 | SIG | |
Windows x86 web-based installer | Windows | 779c4085464eb3ee5b1a4fffd0eabca4 | 1298280 | SIG |
brew install python3
at the Terminal prompt.pip
with get-pip.py
.py -0
command in the VS Code integrated terminal to view the versions of python installed on your machine. The default interpreter is identified by an asterisk (*).code
) in that folder (.
) by entering the following commands:.vscode/settings.json
, which are separate from user settings that are stored globally.('base':conda)
, for example Python 3.7.3 64-bit ('base':conda)
.python.pythonPath
value in your workspace settings to the path of the interpreter. To see the setting, select File > Preferences > Settings (Code > Preferences > Settings on macOS), then select the Workspace Settings tab.python.pythonPath
in your user settings instead, which sets the default interpreter for VS Code in general. The user setting makes sure you always have a default interpreter for Python projects. The workspace settings lets you override the user setting.hello
folder:hello.py
, and it automatically opens in the editor:.py
file extension, you tell VS Code to interpret this file as a Python program, so that it evaluates the contents with the Python extension and the selected interpreter.hello.py
:print
, notice how IntelliSense presents auto-completion options.msg
variable contains a string, IntelliSense provides string methods when you type msg.
:msg
variable and the print
call, and save the file (⌘S (Windows, Linux Ctrl+S)).hello.py
with Python. Just click the Run Python File in Terminal play button in the top-right side of the editor.python3 hello.py
(macOS/Linux) or python hello.py
(Windows):hello.py
by placing the cursor on the print
call and pressing F9. Alternately, just click in the editor's left gutter, next to the line numbers. When you set a breakpoint, a red circle appears in the gutter.launch.json
is the standard name for a file containing debugging configurations.msg
variable appears in the Local pane.msg
, hovering over the variable will display the string Hello world
in a box above the variable.print
statements to quickly inspect variables without necessarily stepping through each line of code in a debugger. In VS Code, you can instead use Logpoints. A Logpoint is like a breakpoint except that it logs a message to the console and doesn't stop the program. For more information, see Logpoints in the main VS Code debugging article.matplotlib
and numpy
packages to create a graphical plot as is commonly done with data science. (Note that matplotlib
cannot show graphs when running in the Windows Subsystem for Linux as it lacks the necessary UI support.)standardplot.py
, and paste in the following source code:as
keywords when you press Enter at the end of a line. To avoid this, type a space, then Enter.matplotlib
package, you should see the message, 'ModuleNotFoundError: No module named 'matplotlib'. Such a message indicates that the required package isn't available in your system.matplotlib
package (which also installs numpy
as a dependency), stop the debugger and use the Command Palette to run Terminal: Create New Integrated Terminal (⌃⇧` (Windows, Linux Ctrl+Shift+`))). This command opens a command prompt for your selected interpreter.virtual environment
that contains a copy of a global interpreter. Once you activate that environment, any packages you then install are isolated from other environments. Such isolation reduces many complications that can arise from conflicting package versions. To create a virtual environment and install the required packages, enter the following commands as appropriate for your operating system:Note: When you create a new virtual environment, you should be prompted by VS Code to set it as the default for your workspace folder. If selected, the environment will automatically be activated when you open a new terminal.
deactivate
in the terminal window to deactivate the virtual environment.