Last active
October 22, 2019 19:51
-
-
Save wcarhart/05c848d3b8e713bf7ed91ed97fc767e7 to your computer and use it in GitHub Desktop.
Setup Python for a CentOS VM (on Hyper-V)
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
# you might need these, if they are not already installed: | |
yum install -y zlib | |
yum install -y zlib-devel | |
yum install -y opensll | |
yum install -y opensll-devel | |
# Install Python 3.6.8 (change version # as necessary) | |
cd /usr/src | |
yum install -y gcc | |
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz | |
tar -zJf Python-3.6.8.tar.xz | |
cd Python-3.6.8 | |
./configure | |
# if you want to overwrite the default Python in place | |
make | |
make install | |
# if you want to be a little bit safer | |
make | |
make altinstall | |
# verify Python | |
python3 --version | |
# verify Pip | |
pip3 --version | |
# if you have a private pip repository | |
mkdir -p ~/.pip | |
touch ~/.pip/pip.conf | |
echo "[global]" > ~/.pip/pip.conf | |
echo "[trusted-host] = <YOUR TRUSTED HOST>" >> ~/.pip/pip.conf | |
echo "[extra-index-url] = <YOUR INDEX URL>" >> ~/.pip/pip.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment