Difference between revisions of "Python Install Methods"

From UVOO Tech Wiki
Jump to navigation Jump to search
(Created page with "## Install Python 3.7 from source on Centos 7 ``` #!/usr/bin/env bash set -eo pipefail version='3.7.7' yum -y install gcc openssl-devel zlib-devel wget make wget https://www....")
 
Line 12: Line 12:
 
#./configure --prefix=/usr/local --enable-optimizations
 
#./configure --prefix=/usr/local --enable-optimizations
 
make altinstall
 
make altinstall
 +
```
 +
 +
Let's setup a virtual environment now.
 +
```
 +
python3.7 -m venv venv
 +
soruce venv/bin/activate
 +
pip install -U pip wheel  # if needed
 +
 
```
 
```

Revision as of 21:16, 19 March 2020

Install Python 3.7 from source on Centos 7

#!/usr/bin/env bash
set -eo pipefail

version='3.7.7'
yum -y install gcc openssl-devel zlib-devel wget make
wget https://www.python.org/ftp/python/$version/Python-$version.tgz
tar xzf Python-$version.tgz
cd Python-$version
./configure --prefix=/usr/local
#./configure --prefix=/usr/local --enable-optimizations
make altinstall

Let's setup a virtual environment now.

python3.7 -m venv venv
soruce venv/bin/activate
pip install -U pip wheel  # if needed