yum安装python3.6

]#yum install python36 -y
]#mkdir /data/workspace
]#cd /data/workspace
]#python36 -m venv env1    ]#pyvenv-3.6 env1   #等价这个命令
]#cd /data/workspace/env1/bin/
]#. activate
(env1)[root@··]#python -m pip install --upgrade pip
(env1)[root@··]#python --version
Python 3.6.3

编译安装python36

]#yum groupinstall "Development Tools"
]#yum install openssl-devel -y
]#tar xf Python3.6
]#cd Python3.6
]#./configure --prefix=/usr/local/python36
]#make -j 4 && make install
···
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-9.0.3 setuptools-39.0.1

]#cd /usr/local/python36/bin
]#./python3.6 -m venv /data/env1
]#cd /data/env1/bin/
]#. activate
(env1)[root@··]#python -m pip install --upgrade pip
(env1)[root@··]#python --version
Python 3.6.5

安装pycharm

下载好pycharm

]#wget https://download.jetbrains.com/python/pycharm-community-2018.1.4.tar.gz
]#tar -xf pycharm-community-2018.1.4.tar.gz  -C /usr/local
]#cd /usr/local
]#mv pycharm-community-2018.1.4 pycharm20180104
]#cd pycharm20180104/bin/
]#./pycharm.sh

接受相关许可及主题风格选择

1528020482526

选择pycharm的运行文件

1528025318983

选择额外的文本编辑模式的配置,可以不选择

1528020523050

python的环境配置

location:/root/PycharmProjects/venvs/env1

base interpreter: /usr/local/bin/python3.6

1528020597818

下次可以直接用charm;命令调用pycharm

]#charm

开始python3&pycharm的愉快之旅吧!