Skip to content

Instantly share code, notes, and snippets.

@zh4n7wm
Last active October 25, 2018 09:43
Show Gist options
  • Save zh4n7wm/85f2b7eb1082c452f800b251d6a2e269 to your computer and use it in GitHub Desktop.
Save zh4n7wm/85f2b7eb1082c452f800b251d6a2e269 to your computer and use it in GitHub Desktop.
CentOS 7 install Python 3

why don't use pyenv

I tried pyenv, but it installed python 3.6 can not find fcntl module.

enable software collections

sudo yum install centos-release-scl

install python 3

sudo yum install rh-python36

using python 3

scl enable rh-python36 bash

check python version

python --version

create virtual environment

cd python-project-src && python -m venv env && source env/bin/activate

more about software collections

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment