怎么让mac终端输入python默认打开python3
1. 终端打开.bash_profile文件sudo open ~/.bash_profile2. 添加别名->最终文件alias python="/usr/local/bin/python3"3. 终端中重新读取.bash_profile文件source ~/.bash_profile
⚠️ Tip: /usr/local/bin/python3 可以根据 which python3 找到python3安装路径
如何查看Python安装目录
#方式1>>> python>>> import sys>>> sys.path#方式2在终端中输入python -V,仍然显示版本号是2.7✅ which python✅ where python
查看安装版本
python -V
安装pip
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"python2.7 get-pip.py
