We at Bangpypers conduct a lot of workshops and some steps are common for all of them. To that end, this post is meant to serve as guide for people to install Python on Ubuntu and Windows (if required), setting up virtualenv and installing the package(s) germane to the corresponding Workshop.
- Check your existing version of Python to see if you already have what’s required.
- Open terminal using
Ctrl+Alt+Tor searching for “Terminal” from app launcher. Once it opens, run the following command to add the Personal Package Archive (PPA):
$sudo add-apt-repository ppa:jonathonf/python-3.6
- Update packages and install Python 3.6 using the following commands:
$sudo apt-get update $sudo apt-get install python3.6 $sudo apt-get install python3-pip $sudo apt-get install python3.6-dev
- Install virtualenv:
$sudo apt-get install virtualenv
- Create a new virtual environment and activate it:
$cd ~ $mkdir twisted_workshop $cd twisted_wokshop $virtualenv -p python3.6 venv $source venv/bin/activate $pip install twisted (For the Twisted Workshop)
- Download and install the binary from https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe
- Add the location of the Python folder at the point of installation to the $PATH environment variable.
- Save the file from here https://bootstrap.pypa.io/get-pip.py and run it using :
- Install virtualenv :
C:\Users\abhiram\Desktop>pip install virtualenv
- Create a new virtual environment and install Twisted in it :
C:\Users\abhiram\Desktop>virtualenv -p python3.6 venv C:\Users\abhiram\Desktop>venv/Scripts/activate C:\Users\abhiram\Desktop>pip install twisted (For the Twisted Workshop)
I hope this helps in setting up the environment so we can get minimize time required in getting started with the meat of the workshop :) If you have any questions, leave them in the comments and I’ll get back to you.