Skip to main content

Python Dev Setup on Mac | Gotchas Documented

Tool Installation #

Here are some personal notes on getting Python setup for my new Mac.

Python Base Install #

At this point, you can use python3 and pip3 commands, but for pipenv you'll need to symlink pip and python.

To do this, note the caveat message produced by brew install python:

Python has been installed as

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into

We need to add the following to the end our ~/.zshrc file (Per this SO Post):

# point python to python3
export PATH

Pipenv #

Get pipenv setup to manage dependencies and virtual environments. Reference Hitchiker's Guide to Python

NOTE: The link above contains a previous section on Python base install. These instructions didn't address symlinking python to python3. Instead of using these, follow notes in Python Base Install section above.

VS Code #

Project Setup #

Python Environment With Pipenv #

Visual Studio Code Launch Configuration #

The following is an example script launch configuration. Note the relative path to the script file in program and the command line args in args.

    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit:
    "version": "0.2.0",
    "configurations": [
            "name": " with test args",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/mp3-convert/",
            "console": "integratedTerminal",
            "justMyCode": true,
            "args": [