Centos7 install pyenv original

Centos7 install pyenv

Sometimes multiple python versions still hope to be isolated by pyenv to avoid interference between different versions of libraries. Sometimes in order to avoid the influence of inherent bugs, I hope to install a pure environment from scratch, and pyenv can work.

Install the dependent library files in advance##

sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

Install pyenv

mkdir ~/.pyenv
git clone git://github.com/yyuu/pyenv.git ~/.pyenv  
echo 'export PYENV_ROOT="$HOME/.pyenv"'>>~/.bashrc  
echo 'export PATH="$PYENV_ROOT/bin:$PATH"'>>~/.bashrc  
echo 'eval "$(pyenv init -)"'>>~/.bashrc  
exec $SHELL -l 

Test if it is installed##

pyenv install --list

An error may be reported, install the corresponding library files in advance and then install the environment

pip error while installing Python: “Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS”

The following library files need to be installed under ubuntu

apt-get install make build-essential libssl-dev zlib1g-dev libbz2-dev libsqlite3-dev

If it is Centos, install the following library files

yum install zlib-devel bzip2-devel sqlite sqlite-devel openssl-devel

Install python3.5.2 environment

pyenv install 3.5.2

Install the package for the corresponding environment##

. Install the Python version you need:

pyenv install 3.4.5 //The package that comes with the installation is pip and setuptools
Switch the system default Python version:
& pyenv global 3.4.5
Install the packages you need:
$ sudo ~/.pyenv/version/3.4.1/pip3 install requests
or it could be
$ pip install xxx //xxx is the package name

pip install requests

sudo ~/.pyenv/version/3.4.1/pip3 install requests

( adsbygoogle = window.adsbygoogle || []).push({});

Recommended Posts

Centos7 install pyenv original
Centos7 install docker-18.x original
CentOS 7 install Redis 5.0.8 original
Centos 7 install Zabbix 3.4 original
1.5 Install Centos7
CENTOS7 manually install CEPH original
Centos6 install Python2.7.13
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS 7 install Docker
CentOS7 install GlusterFS
CentOS7 install Docker
Centos6.5 install Tomcat
CentOS install Python 3.6
Vmware install CentOS6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Centos7 install Python2.7
Centos 7.6 install seleniu
CentOS 7.3 install Zabbix3
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)
CentOS install PHP
CentOS6 install mist.io
Centos7 install Docker
CentOS7 install mysql
centOs install rabbitMQ
CentOS 7 install MySQL 5.6
Centos7 install Nginx
CentOS6.5 install CDH5.13
Centos7 install docker18
Centos install Python3
centos7 install docker
CentOS install jdk
centos7 install nginx-rtmp
CentOS8 install MySQL8.0
Centos6.3 install KVM
CentOS install PostgreSQL 9.1
CentOS7 install mysql8
CentOS 7 install Java 1.8
CentOS8 install fastdfs6.06
CentOS 7 install Gitlab
Centos 7 install PostgreSQL
CentOS7 install MySQL8
CentOS 7 install Java 1.8
CentOS 6 install Docker
centos 6.5 install zabbix 4.4
Centos8 install Docker
CentOS6.8 install python2.7
CentOS install nodejs 8
CentOS6.5 install GNS3
centos 7.5 install mysql5.7.17
Centos7 install MySQL8.0-manual
CentOS7 install Kubernetes 1.16.3
VirtualBox install centos7