Skip to content

Instantly share code, notes, and snippets.

@gladson
Last active December 18, 2015 13:18
Show Gist options
  • Save gladson/5788467 to your computer and use it in GitHub Desktop.
Save gladson/5788467 to your computer and use it in GitHub Desktop.
Instalando o python e setando a versão em um determinando virtualenv

##Dependências para instalar o python no Ubuntu

$ sudo apt-get install build-essential
$ sudo apt-get install libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev

##Entre na pasta onde vc vai baixar o python:

$ cd ~/Downloads/
$ wget http://python.org/ftp/python/2.7.4/Python-2.7.4.tgz

##Descompacte o arquivo que vc baixou:

$ tar -xvf Python-2.7.4.tgz
$ cd Python-2.7.4

##Agora vem a instalação do python:

$ ./configure
$ make
$ sudo make altinstall

##Se caso você não saiba onde seu python foi instalado:

1. which python
2. whereis python
3. find / -name python

##Então vamos ao virtualenv, setar o python de sua escolha:

$ virtualenv -p /usr/bin/python2.7 nome_do_env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment