Last active
September 28, 2024 14:48
-
-
Save hrushikesh198/1baffbbf106191d37e07cab266405b7a to your computer and use it in GitHub Desktop.
Revisions
-
hrushikesh198 renamed this gist
Feb 2, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
hrushikesh198 revised this gist
Feb 2, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #Installing Python2.7 If you download a different version it should work similarly. ``` cd ~ wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz -
hrushikesh198 revised this gist
Feb 2, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,8 @@ cd Python-2.7.13 ./configure make altinstall prefix=~/.local/ ``` The `configure` and `make` step takes few minutes. Now python 2.7 would be present in `~/.local/bin.` Add this to PATH. This is very important as the following steps depend on it. ``` export PATH=~/.local/bin:$PATH -
hrushikesh198 renamed this gist
Feb 2, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
hrushikesh198 revised this gist
Feb 2, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,7 +9,7 @@ cd Python-2.7.13 make altinstall prefix=~/.local/ ``` The `configure` and `make` step takes few minutes. Now python 2.7 would be present in `~/.local/bin` Add this to PATH. This is very important as all the following steps assume `python2.7` is available in path from `~/.local/bin`. ``` export PATH=~/.local/bin:$PATH @@ -42,6 +42,7 @@ virtualenv -p ~/.local/bin/python2.7 e1 virtualenv --relocatable e1 ## To use e1 source ~/venv/e1/bin/activate ## pip install some libraries inside the env e1 ## To exit deactivate ``` -
hrushikesh198 revised this gist
Feb 2, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,8 @@ You can also create a soft-link to `python2.7` so that `python` command gives yo cd ~/.local/bin; ln -s python2.7 python ``` #Lets talk about installing pip Download the get-pip.py file and install it for the current user. It will leave `pip` and `pip2.7` executables in `~/.local/bin`. ``` @@ -30,6 +31,7 @@ wget https://bootstrap.pypa.io/get-pip.py python2.7 get-pip.py --user ``` #Setting up Virtualenv and Shipping to another machine ``` pip install virtualenv --user -
hrushikesh198 revised this gist
Feb 2, 2017 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ #I will show the steps using Python2.7.13 If you download a newer version it should work similarly. ``` cd ~ wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz @@ -20,7 +21,7 @@ You can also create a soft-link to `python2.7` so that `python` command gives yo cd ~/.local/bin; ln -s python2.7 python ``` #Lets talk about installing pip. Download the get-pip.py file and install it for the current user. It will leave `pip` and `pip2.7` executables in `~/.local/bin`. ``` @@ -29,7 +30,7 @@ wget https://bootstrap.pypa.io/get-pip.py python2.7 get-pip.py --user ``` #Setting up Virtualenv and Shipping to another machine ``` pip install virtualenv --user cd ~ -
hrushikesh198 renamed this gist
Feb 2, 2017 . 1 changed file with 23 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -8,13 +8,14 @@ cd Python-2.7.13 make altinstall prefix=~/.local/ ``` The `configure` and `make` step takes few minutes. Now python 2.7 would be present in `~/.local/bin` Add this to PATH. This is very important as all the followinf steps assume `python2.7` is available in path from `~/.local/bin`. ``` export PATH=~/.local/bin:$PATH python2.7 # should work fine ``` It is a good idea to add the `export` statement to `~/.bashrc` file to load at login. You can also create a soft-link to `python2.7` so that `python` command gives you v2.7 ``` cd ~/.local/bin; ln -s python2.7 python ``` @@ -25,5 +26,24 @@ It will leave `pip` and `pip2.7` executables in `~/.local/bin`. ``` cd ~ wget https://bootstrap.pypa.io/get-pip.py python2.7 get-pip.py --user ``` Setting up Virtualenv and Shipping to another machine ``` pip install virtualenv --user cd ~ mkdir venv cd venv virtualenv -p ~/.local/bin/python2.7 e1 virtualenv --relocatable e1 ## To use e1 source ~/venv/e1/bin/activate ## To exit deactivate ``` For shipping it to a different machine Copy `~/.local` and `~/venv/e1`. You will get your python and installed packages on a different machine inside env `e1`. It is a good idea to make a tarball and scp to save some time. -
hrushikesh198 revised this gist
Feb 2, 2017 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -27,5 +27,3 @@ cd ~ wget https://bootstrap.pypa.io/get-pip.py ~/.local/bin/python2.7 get-pip.py --user ``` -
hrushikesh198 revised this gist
Feb 2, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,8 @@ cd ~ wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz tar -xzvf Python-2.7.13.tgz cd Python-2.7.13 ./configure make altinstall prefix=~/.local/ ``` The `configure` and `make` step takes few minutes. Now python 2.7 would be present in `~/.local/bin` Add this to PATH -
hrushikesh198 revised this gist
Feb 2, 2017 . No changes.There are no files selected for viewing
-
hrushikesh198 revised this gist
Feb 2, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,9 @@ python2.7 # should work fine ``` It is a good idea to add the `export` statement to `~/.bashrc` file to load at login. You can also create a soft-link to `python2.7` so that `python` command gives you 2.7 ``` cd ~/.local/bin; ln -s python2.7 python ``` Lets talk about installing pip. Download the get-pip.py file and install it for the current user. -
hrushikesh198 revised this gist
Feb 2, 2017 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,29 +1,29 @@ I will show the steps using Python2.7.13 If you download a newer version it should work similarly. ``` cd ~ wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz tar -xzvf Python-2.7.13.tgz cd Python-2.7.13 ./configure --prefix=~ make altinstall ``` The `configure` and `make` step takes few minutes. Now python 2.7 would be present in `~/.local/bin` Add this to PATH ``` export PATH=~/.local/bin:$PATH python2.7 # should work fine ``` It is a good idea to add the `export` statement to `~/.bashrc` file to load at login. You can also create a soft-link to `python2.7` so that `python` command gives you 2.7 `cd ~/.local/bin; ln -s python2.7 python` Lets talk about installing pip. Download the get-pip.py file and install it for the current user. It will leave `pip` and `pip2.7` executables in `~/.local/bin`. ``` cd ~ wget https://bootstrap.pypa.io/get-pip.py ~/.local/bin/python2.7 get-pip.py --user ``` Pip shows some ssl warnings. You can fix those by doing the folowing. -
hrushikesh198 renamed this gist
Feb 2, 2017 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
hrushikesh198 created this gist
Feb 2, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ I will show the steps using Python2.7.13 If you download a newer version it should work similarly. ` cd ~ wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz tar -xzvf Python-2.7.13.tgz cd Python-2.7.13 ./configure --prefix=~ make altinstall ` The `configure` and `make` step takes few minutes. Now python 2.7 would be present in `~/.local/bin` Add this to PATH ` export PATH=~/.local/bin:$PATH python2.7 # should work fine ` It is a good idea to add the `export` statement to `~/.bashrc` file to load at login. You can also create a soft-link to `python2.7` so that `python` command gives you 2.7 `cd ~/.local/bin; ln -s python2.7 python` Lets talk about installing pip. Download the get-pip.py file and install it for the current user. It will leave `pip` and `pip2.7` executables in `~/.local/bin`. ` cd ~ wget https://bootstrap.pypa.io/get-pip.py ~/.local/bin/python2.7 get-pip.py --user ` Pip shows some ssl warnings. You can fix those by doing the folowing.