
Install Python across Mac, Windows, and Linux, set up a basic project with a code editor, and explore cloud-based virtual machines for production deployments.
download and install python 3.10.6 from python.org on macOS using the universal installer for Intel or Apple silicon, then verify the version in Terminal and optionally use IDLE.
Learn to use the Mac terminal and the command line to navigate directories, run Python scripts, and edit files with echo and cat.
How to install XCode:
1. Open up the App Store on your macOS
2. Search and install XCode from Apple
3. Open XCode, Install Additional Components when prompted.
4. Going forward, be sure to run Software Update on your macOS to ensure the latest version of Xcode and Command Line Tools are installed.
A terminal-based way to install Command Line Tools:
macOS Software updates often include the XCode Command Line Tools.
That said, I like running the following command on occasion to ensure I have the latest CLI tools from XCode:
```bash
sudo xcode-select --install
```
The Command Line Tools from XCode are often required for all kinds of software development on macOS which does not always include Python.
Install homebrew on macOS via the terminal, then use brew search and brew install to manage packages; though Homebrew can install Python, installing Python from source supports multiple versions.
install certify to fix certificate or ssl errors by verifying python certificates via the install certificates command or the certify package, then confirm the installation.
Install another major Python 3 release across Mac, Windows, and Linux. Use universal installers on Mac and verify with python3.9 --version, then create a virtual environment for the version.
Install Visual Studio Code across Mac, Windows, and Linux, and explore its built-in Git, Python extension, and cross-platform extensions for Docker, Kubernetes, and remote SSH.
Explore creating and using python virtual environments with venv to lock in specific python versions and installed packages like requests. Activate environments, upgrade pip, and manage package versions safely.
Set up a full Python project with a virtual environment, Django, and VS Code, including creating a workspace, managing dependencies with requirements.txt, and running the development server.
Start using your Mac for Python projects; explore the Linux virtual machine setup to align your development environment with production, emphasizing Python version and virtual environments.
Install Python 3.10 on Windows using the official python.org installer, choose 64-bit if available, customize the path to c:\python310, enable pip and path, and verify via PowerShell.
Master PowerShell basics to run Python and other runtimes, navigate with cd and ls, create and delete files with echo and rm, and manage directories using mkdir and rmdir.
Learn to isolate projects with built-in venv, install packages via pip from PyPI, and manage per-project Django and Python versions across macOS, Windows, and Linux.
Create a Django project in VS Code by setting up a dev workspace, a virtual environment, and dependencies from requirements.txt, then initialize git and run the server.
Learn to use Linux virtual machines for development and production readiness with AWS EC2, Linode, and DigitalOcean, while coding in VS Code via remote SSH.
Think of using a virtual machine like you are renting a computer but one that you don't have physical access to. Virtual Machines, or VMs for short, are often used to serve websites but can be used for almost any type of computing. In our case, it's just to setup a development environment for our Python-based projects!
To provision or use a virtual machine, we have to pick a cloud hosting platform. A few options we have in this course are:
Amazon Web Services
Linode
DigitalOcean
Once you provision a virtual machine on the above cloud hosting platforms, there's a good chance you can do it on nearly any other platform since it's such a common technology. If there's a platform you'd like me to add to this course, please let me know!
Pros to using a VM:
You can spin one up fast, sometimes in seconds
It can be super cheap like $5/mo
Your billed for what you use
You get a feel for production-like environments
You get to learn Linux and build up your technical chops
If you have Internet, there's a good chance you can connect to your VM regardless of the device your on (Windows, Mac, Smartphone, Tablet)
You can delete it anytime and remove future charges
Your development environment better matches a real production environment
Cons to using a VM:
It's really easy to rack up charges and forget to turn VMs off
Saving work done on a VM may require extra steps
If you lose access keys, you can lose everything on the VM
If you don't have an internet connection, you won't be able to connect to the VM
You can accidentally (& easily) delete it with unsaved work
Generate an OpenSSH RSA key pair with ssh-keygen, optionally set a passphrase, view both keys with cat, and use the private key as the identity file for SSH connections.
Think of using a virtual machine like you are renting a computer but one that you don't have physical access to. Virtual Machines, or VMs for short, are often used to serve websites but can be used for almost any type of computing. In our case, it's just to setup a development environment for our Python-based projects!
To provision or use a virtual machine, we have to pick a cloud hosting platform. A few options we have in this course are:
Amazon Web Services
Linode
DigitalOcean
Once you provision a virtual machine on the above cloud hosting platforms, there's a good chance you can do it on nearly any other platform since it's such a common technology. If there's a platform you'd like me to add to this course, please let me know!
Pros to using a VM:
You can spin one up fast, sometimes in seconds
It can be super cheap like $5/mo
Your billed for what you use
You get a feel for production-like environments
You get to learn Linux and build up your technical chops
If you have Internet, there's a good chance you can connect to your VM regardless of the device your on (Windows, Mac, Smartphone, Tablet)
You can delete it anytime and remove future charges
Your development environment better matches a real production environment
Cons to using a VM:
It's really easy to rack up charges and forget to turn VMs off
Saving work done on a VM may require extra steps
If you lose access keys, you can lose everything on the VM
If you don't have an internet connection, you won't be able to connect to the VM
You can accidentally (& easily) delete it with unsaved work
Think of using a virtual machine like you are renting a computer but one that you don't have physical access to. Virtual Machines, or VMs for short, are often used to serve websites but can be used for almost any type of computing. In our case, it's just to setup a development environment for our Python-based projects!
To provision or use a virtual machine, we have to pick a cloud hosting platform. A few options we have in this course are:
Amazon Web Services
Linode
DigitalOcean
Once you provision a virtual machine on the above cloud hosting platforms, there's a good chance you can do it on nearly any other platform since it's such a common technology. If there's a platform you'd like me to add to this course, please let me know!
Pros to using a VM:
You can spin one up fast, sometimes in seconds
It can be super cheap like $5/mo
Your billed for what you use
You get a feel for production-like environments
You get to learn Linux and build up your technical chops
If you have Internet, there's a good chance you can connect to your VM regardless of the device your on (Windows, Mac, Smartphone, Tablet)
You can delete it anytime and remove future charges
Your development environment better matches a real production environment
Cons to using a VM:
It's really easy to rack up charges and forget to turn VMs off
Saving work done on a VM may require extra steps
If you lose access keys, you can lose everything on the VM
If you don't have an internet connection, you won't be able to connect to the VM
You can accidentally (& easily) delete it with unsaved work
Master creating ssh shortcuts and managing private keys across mac, windows, and linux by configuring an ssh config with identity file and hosts for Linode, DigitalOcean, and aws.
Learn to set up VS Code and use the Remote-SSH extension to connect to remote virtual machines, edit files, run Python, and manage remote development.
Install and manage multiple Python 3 versions on Linux using apt and the Dead Snakes repository, verify versions, and create virtual environments to isolate project dependencies.
Install Python from source to use a specific version, 3.8.7, by downloading the tarball, configuring with optimizations, compiling, and performing an alt install to preserve the system Python.
Isolate Python versions per project with virtual environments to ensure compatibility with third-party packages from PyPI, such as Django, and manage pip across versions like 3.5 to 3.10+.
Learn how to create and use virtual environments to isolate Python projects, manage multiple Python versions, and install dependencies with pip and a requirements file.
Set up a Django project on three virtual machines, create Python virtual environments, and run the dev server on port 8000 with 0.0.0.0 access across Linode, Digital Ocean, and AWS.
Set up a Python development environment and learn on demand as you build real projects, share your code and insights, and help others grow.
Python is one of the most widely used programming languages in the world. In this course, I'll show you exactly how to set it up regardless of what operating system your computer is.
The setup process can be very simple (such as download Python and run it) but it can also start to get rather complex. My goal is to break apart this complexity and put it into manageable chunks that allow you to actually have a solid foundation of how to install Python and actually use it in real projects.
This course is the result of nearly a decade of teaching students around the world how to best setup Python environments and develop applications and automations with Python. Based on feedback, this course will continue to be updated and upgraded to ensure you have the best possible way to set up your Python development environment at your fingertips.
Installing Python is one of the most popular blog posts on my website so I created this course as a comprehensive look at installing Python across multiple machines. My favorite part for more advanced users (just beyond beginner) is using and coding Python with a Virtual Machine along with VS Code.
After finishing this, you will be able to install:
Python 3.5
Python 3.6
Python 3.7
Python 3.8
Python 3.9
Python 3.10
PYthon 3.11
And any other python version that comes out!
Supported Platforms:
macOS
Windows (XP or Later)
Linux