最新版的MacOS Sierra默认带的python环境仍然为2.7.10,本文将介绍使用Brew安装python3.5并做简单的配置,打造python2,python3共存的开发环境 直接尝试brew安装,提示需要执行brew link gdbm thatsitdeMacBook-Pro:~ thatsit$ brew install python3 Updating Homebrew... Error: You must `brew link gdbm` before python3 can
在命令行执行 vi ~/.bash_profile 在文件下面加上: alias python2='/system/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7' //python2 的地址 alias python3='/usr/local/Frameworks/Python.framework/Versions/3.7/bin/python3.7' //python3 的地址 alias python=pytho
print def print(self, *args, sep=' ', end='\n', file=None): # known special case of print """ print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False) Prints the values to a stream, or to sys.stdout by default. Optional keyword ar