Use pyenv to manage your Python environment

Install pyenv:

Manually:

If you use bash as your shell, please change .zshrc to .bashrc

echo 'if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi' >> ~/.bashrc
source .bashrc

Install Scripts

curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash

Install Python

Install dependency

# for ubuntu
sudo apt install -y build-essential checkinstall libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev zlib1g-dev openssl libffi-dev python3-dev python3-setuptools wget

# for mac
brew install zlib
export LDFLAGS="-L/usr/local/opt/zlib/lib"
export CPPFLAGS="-I/usr/local/opt/zlib/include"

Install Python

v=3.7.0;wget http://mirrors.sohu.com/python/$v/Python-$v.tar.xz -P ~/.pyenv/cache/;pyenv install $v  


 Previous
Merging two dicts in Python 3.5+ with a single expression Merging two dicts in Python 3.5+ with a single expression
# How to merge two dictionaries # in Python 3.5+ >>> x = {'a': 1, 'b': 2} >>> y = {'b': 3, 'c': 4} >>> z = {**x, **y}
2019-02-25 Mr Wang
Next 
For Further For Further
   link ….. start ….. sprit ……connect ….. 新的开始 从毕业转行到现在,也已经一年零两个月了。 时光荏苒,想来一点也没错。 每当回首往事的时候,总感觉好像是在梦里度过的。 但是眼下的事情却又如此真实。
2018-09-01 Mr Wang