Skip to content

Instantly share code, notes, and snippets.

@HilmiZul
Last active October 6, 2018 15:48
Show Gist options
  • Select an option

  • Save HilmiZul/068431ecb4c1e279cb11089d5e5fed2e to your computer and use it in GitHub Desktop.

Select an option

Save HilmiZul/068431ecb4c1e279cb11089d5e5fed2e to your computer and use it in GitHub Desktop.
[Basic] Setup Py for web development with Django on Debian Wheezy 😁

Install clang

$ sudo apt-get update && apt-get install clang

Python 2.7.15 (Latest)

Remove python 2.7.3

$ sudo apt-get purge python2.x-minimal

or

$ sudo apt-get remove python2.7-minimal

Download Python 2.7.15

Python 3.x

$ sudo apt-get install python3 python3-dev

Install pip

$ sudo apt-get install python-pip

Upgrade pip

Provide package index URL using HTTPS protocol to upgrade pip (e.g 8.1.2)

$ sudo pip install --upgrade --index-url=https://pypi.python.org/simple/ pip==8.1.2

Upgrade again 😁

$ sudo pip install --upgrade pip

Install virtualenv

$ sudo pip install virtualenv

Create alias for pip2 as pip 😁

$ echo "alias pip='pip2'" >> ~/.bash_profile

$source ~/.bash_profile

$ python --version

python 2.7.15

$ pip --version

pip 18.1

$ virtualenv --version

virtualenv 16.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment