Getting Started With Python3
2 min readI recently started the Full Stack Development Boot camp at PDX Code Guild here in Portland. Being completely new to Python development I needed to learn how to get Python on my machine and how to set it up for development with Visual Studio Code, my editor of choice. This post is a short guide on how to do so.
Installing Python3
macOS comes with python
installed natively but as you can see it’s not Python 3.
python --version
# Python 2.7.10
Being that I’m on a Mac I will be using Homebrew to install Python 3. If you are unfamiliar with Homebrew please feel free to checkout my tutorial on YouTube.
brew update
brew install python
After installation we should now have access to python3
from the command line:
python3 --version
# Python 3.6.5
which python3
# usr/local/bin/python3
Setting up Visual Studio Code
For VS Code we will want to install two extensions Python and Python for VSCode. We can set up our editor for use the latest version of Python by pressing: CMD + Shift + P
, selecting Python: Select Interpreter
, and then selecting Python 3.6.5
. Likewise we can choose our linter through the same process but selecting instead Python: Select Linter
. I chose to enable pep8
.
You should now see the following in your settings.json
file:
{
"python.linting.pylintEnabled": false,
"python.linting.pep8Enabled": true,
"python.linting.enabled": true,
"python.pythonPath": "/usr/local/bin/python3"
}
For more in depth setup you can go to the VS Code documentation here.
Related Articles
A Far Too In-Depth Guide To SSH For Web Developers
Everything I have learned when it comes to SSH after setting up my Raspberry Pi Cluster.
Python Scripting In iTerm2
How to use the Python Scripting API in iTerm2 to open several tabs and execute commands in those tabs.
Migrating From Yarn To Pnpm
My experience moving from classic yarn to pnpm as my package manager in JavaScript land.
How To Kill Processes On MacOS
A quick posts on how to kill processes on macOS.
Writing A Connect Four Game Reader In Python
Writing a program that will read moves and populate a game board for the popular game Connect Four using Python.
Recursion & Memoization In Python
Working through Fibonacci using recursion and memoization in Python.
Building A Black Jack Advice Generator With Python
How to build a simple black jack advice generator using Python.
Up & Running With iTerm & Zsh
How to get started with iTerm2, ZSH, & VSCode.
Deploying With Now
How to deploy with Zeit's Now platform.
Cody is a Christian, USN Veteran, Jayhawk, and an American expat living outside of Bogotá, Colombia. He is currently looking for new opportunities in the tech industry.