Setup
Setup Python for working with this book.
In this book, we will setup the Python interpreter from source using python.org website.
Linux
Here are different methods to setup Python for your linux distribution.
Ubuntu
We make sure that source packages are enabled in the repo. The file /etc/apt/sources.list lists all the source packages.
For bionic, we enable it using the command.
deb-src http://archive.ubuntu.com/ubuntu/ bionic mainThen we install the source dependencies.
sudo apt-get update
sudo apt-get build-dep python3.8Download Python from python.org
curl -O https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tgz
tar xvf Python-3.8.1.tgzBuild Python
cd Python-3.8.1/
./configure
makeCheck the version of Python
Let us setup a virtual environment with the interpreter.
Let us install the two utilities that will use in this book.
Let us install static type checker, mypy.
And install testing tool and the library pytest We wont be using pytest in this tutorial, we will use it as test runner.
Last updated
Was this helpful?