before we begin to run brew commands from any folder in the terminalyou need to add the homebrew path to your path environment variable open or create ~bash_profile and add the following line at the end of the fileexport path=/usr/local/bin:$path close and reopen terminal upon reopeningthe new path variable will be included in the environmentand now you can call brew from anywhere use brew to find the available packages for pythonbrew search python you will now see all the python-related packagespython being one of them nowinstall python using the following brew commandbrew install python finallyyou can check that python is installed and workingpython --version when you install python with homebrewyou also install the corresponding package manager (pip)setuptoolsand pyvenv (an alternative to virtualenvbut for this book you will only need pipcheck that pip is workingpip --version if you see the version informationit means that pip was successfully installed on your systemand you can skip past the windows installation section to the section on using pip to install virtualenv windows begin by downloading the python windows installer you can download the installer herewhen your download is donerun the installer and select the customize option make sure that pip is selected to be installed alsoselect the option to add python to your environment variables