-
-
Save gpapin/5445456 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| mkdir ~/down/ | |
| cd ~/down/ | |
| sudo apt-get install build-essential | |
| wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz | |
| tar -xzf Python-2.7.2.tgz | |
| cd Python-2.7.2 | |
| sudo apt-get install libsqlite3-dev zlib1g-dev libncurses5-dev | |
| sudo apt-get install libgdbm-dev libbz2-dev libreadline5-dev | |
| sudo apt-get install libssl-dev libdb-dev | |
| sudo apt-get install libmysqlclient-dev | |
| easy_install mysql-python | |
| #tk8.4-dev | |
| ./configure --prefix=/opt/python27 --enable-shared | |
| make | |
| sudo make install | |
| echo "/opt/python27/lib" | sudo tee -a /etc/ld.so.conf.d/python27.conf | |
| sudo ldconfig | |
| cd ~/down/ | |
| wget http://peak.telecommunity.com/dist/ez_setup.py | |
| sudo /opt/python27/bin/python ez_setup.py | |
| sudo /opt/python27/bin/ | |
| sudo /opt/python27/bin/easy_install-2.7 virtualenv | |
| /opt/python27/bin/virtualenv ~/env | |
| cat >> ~/.profile <<DELIM | |
| if [ -d "\$HOME/env/bin" ] ; then | |
| PATH="\$HOME/env/bin:\$PATH" | |
| fi | |
| DELIM | |
| source ~/.profile | |
| #echo follow to ~/.profile | |
| #if [ -d "$HOME/env/bin" ] ; then | |
| # PATH="$HOME/env/bin:$PATH" | |
| #fi | |
| #export PATH="$HOME/env/bin:$PATH" | |
| echo 'maybe we are done....' |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Installer le gist qui va mettre python 2.7 dans /opt/
Si des erreurs distribute :
On doit être avec une version de distribute >=0.6.28
$ pip install distributeSi des erreurs mysql :
$ aptitude install python-dev libmysql-dev mysqlserver-devInstaller virtual env wrapper avec python 2.7
A placer dans ~/.bashrc