Skip to content

Instantly share code, notes, and snippets.

@dwayne
Last active December 9, 2020 20:48
Show Gist options
  • Save dwayne/e77f267d871244471e3b to your computer and use it in GitHub Desktop.
Save dwayne/e77f267d871244471e3b to your computer and use it in GitHub Desktop.

Revisions

  1. dwayne revised this gist Jan 5, 2016. 1 changed file with 15 additions and 0 deletions.
    15 changes: 15 additions & 0 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -37,6 +37,21 @@ $ ~/local/python-3.5.1/bin/python3 --version
    1. While in the Python source directory you should also check out the README for any extra help on the installation process. `cat README | less`
    2. View the configuration help with `./configure --help` while in the Python source directory.

    **Quick Start with Python 3.5.1**

    ```sh
    $ mkdir ~/sandbox/python3-playground
    $ cd ~/sandbox/python3-playground
    $ ~/local/python-3.5.1/bin/pyvenv env
    $ . env/bin/activate
    (env) $ pip install django
    (env) $ ...
    (env) $ deactivate
    $ exit
    ```

    Learn more about virtual environments in Python 3.5.1 [here](https://docs.python.org/3.5/tutorial/venv.html).

    **References**

    - http://askubuntu.com/questions/572973/how-to-update-python-version-on-ubuntu-14-10
  2. dwayne revised this gist Jan 4, 2016. 1 changed file with 21 additions and 1 deletion.
    22 changes: 21 additions & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Installing Python from source on Ubuntu

    For whatever reason you may want to upgrade your version of Python that came with your Ubuntu distro. However, completely
    relacing the system version is not recommended. Here is how to install Python for the local user.
    replacing the system version is not recommended. Here is how to install Python for the local user.

    **Python 2.7.10**

    @@ -17,6 +17,26 @@ $ make install
    $ ~/local/python-2.7.10/bin/python --version
    ```

    **Python 3.5.1**

    ```sh
    $ mkdir ~/local/python-3.5.1
    $ cd ~/Downloads
    $ wget https://www.python.org/ftp/python/3.5.1/Python-3.5.1.tgz
    $ tar -zxvf Python-3.5.1.tgz
    $ cd Python-3.5.1
    $ ./configure --prefix=$HOME/local/python-3.5.1/
    $ make
    $ make test
    $ make install
    $ ~/local/python-3.5.1/bin/python3 --version
    ```

    **Tips**

    1. While in the Python source directory you should also check out the README for any extra help on the installation process. `cat README | less`
    2. View the configuration help with `./configure --help` while in the Python source directory.

    **References**

    - http://askubuntu.com/questions/572973/how-to-update-python-version-on-ubuntu-14-10
  3. dwayne revised this gist Oct 27, 2015. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -43,4 +43,13 @@ $ ~/local/python-2.7.10/bin/pip install virtualenv

    **References**

    - https://virtualenv.pypa.io/en/latest/installation.html
    - https://virtualenv.pypa.io/en/latest/installation.html

    # Starting a new project

    ```sh
    $ mkdir ~/projects/helloworld
    $ cd ~/projects/helloworld
    $ ~/local/python-2.7.10/bin/virtualenv env
    $ . env/bin/activate
    ```
  4. dwayne revised this gist Oct 27, 2015. 1 changed file with 11 additions and 1 deletion.
    12 changes: 11 additions & 1 deletion install.md
    Original file line number Diff line number Diff line change
    @@ -33,4 +33,14 @@ $ ~/local/python-2.7.10/bin/pip --version

    **References**

    - https://pip.pypa.io/en/stable/installing/
    - https://pip.pypa.io/en/stable/installing/

    # Installing virtualenv

    ```sh
    $ ~/local/python-2.7.10/bin/pip install virtualenv
    ```

    **References**

    - https://virtualenv.pypa.io/en/latest/installation.html
  5. dwayne revised this gist Oct 27, 2015. 1 changed file with 19 additions and 5 deletions.
    24 changes: 19 additions & 5 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -1,22 +1,36 @@
    # Installing Python from source on Ubuntu

    For whatever reason you may want to upgrade your version of Python that came with your Ubuntu distro. However, completely
    relacing the system version is not recommended. Here is how to install Python and virtualenv for the local user.
    relacing the system version is not recommended. Here is how to install Python for the local user.

    **Python 2.7.10**

    ```
    $ mkdir /home/<user>/local/python-2.7.10
    $ cd /home/<user>/src
    ```sh
    $ mkdir ~/local/python-2.7.10
    $ cd ~/Downloads
    $ wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
    $ tar -zxvf Python-2.7.10.tgz
    $ cd Python-2.7.10
    $ ./configure --prefix=/home/<user>/local/python-2.7.10
    $ make
    $ make install
    $ ~/local/python-2.7.10/bin/python --version
    ```

    **References**

    - http://askubuntu.com/questions/572973/how-to-update-python-version-on-ubuntu-14-10
    - http://stackoverflow.com/q/1534210/391924
    - http://stackoverflow.com/q/1534210/391924

    # Installing pip

    ```sh
    $ cd ~/Downloads
    $ wget https://bootstrap.pypa.io/get-pip.py
    $ ~/local/python-2.7.10/bin/python get-pip.py
    $ ~/local/python-2.7.10/bin/pip --version
    ```

    **References**

    - https://pip.pypa.io/en/stable/installing/
  6. dwayne created this gist Oct 27, 2015.
    22 changes: 22 additions & 0 deletions install.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    # Installing Python from source on Ubuntu

    For whatever reason you may want to upgrade your version of Python that came with your Ubuntu distro. However, completely
    relacing the system version is not recommended. Here is how to install Python and virtualenv for the local user.

    **Python 2.7.10**

    ```
    $ mkdir /home/<user>/local/python-2.7.10
    $ cd /home/<user>/src
    $ wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz
    $ tar -zxvf Python-2.7.10.tgz
    $ cd Python-2.7.10
    $ ./configure --prefix=/home/<user>/local/python-2.7.10
    $ make
    $ make install
    ```

    **References**

    - http://askubuntu.com/questions/572973/how-to-update-python-version-on-ubuntu-14-10
    - http://stackoverflow.com/q/1534210/391924