一、配置默认python版本为2.7 1、vi ~/.bash_profile (默认没有这个文件,创建一个即可) 2、增加以下配置 alias python="/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7" 1 退出保存 3、source ~/.bash_profile 二、配置python 3 alias python="/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7" alias python3="/usr/local/bin/python3.6" 如果不用以上方法: ~/.bash_profile 文件中最后一个为默认 |
GMT+8, 2025-1-18 11:51 , Processed in 0.034824 second(s), 19 queries , Gzip On.
Powered by Discuz! X3.5
© 2001-2024 Discuz! Team.