Created
January 5, 2020 05:48
-
-
Save kangks/67f57bb5e896465fa60340e2714d49f5 to your computer and use it in GitHub Desktop.
Python 3.7 installation Jupyter Notebook
This file contains 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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Installation of Python 3.7" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Step 1: Prerequsities" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"!sudo yum install gcc openssl-devel bzip2-devel libffi-devel" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Step 2: Download from https://www.python.org/downloads/release/python-376/ and install\n", | |
"* make altinstall is used to prevent replacing the default python binary file /usr/bin/python" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"%%script bash\n", | |
"\n", | |
"cd /opt \\\n", | |
"&& sudo wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz \\\n", | |
"&& sudo tar xzf Python-3.7.6.tgz \\\n", | |
"&& cd Python-3.7.6 \\\n", | |
"&& sudo ./configure --enable-optimizations \\\n", | |
"&& sudo make altinstall " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Step 3: Verify installation" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"!python3.7 --version" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Step 4: Cleanup" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"!sudo rm /opt/Python-3.7.6.tgz" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "conda_amazonei_mxnet_p36", | |
"language": "python", | |
"name": "conda_amazonei_mxnet_p36" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment