MAC下Pycharm配置Python环境

使用MAC配置Python环境

1.打开安装好的Pycharm
MAC下Pycharm配置Python环境
2.创建一个新项目
MAC下Pycharm配置Python环境
3.可以添加自己想存放的位置
MAC下Pycharm配置Python环境
4.选择Python安装路径
5.安装路径查询:打开终端输入which pythonMAC下Pycharm配置Python环境
6.点击create,进入主页
MAC下Pycharm配置Python环境
7.MAC下Pycharm配置Python环境
8.不用加后缀名
9.写个简单的运行一下OK啦~
MAC下Pycharm配置Python环境
查询Python版本:MAC下Pycharm配置Python环境
升级Python版本
1.打开终端执行命令:open ~/.bash_profile
2.确认.bash_profile文件里是否存在以下内容,没有则添加并保存

Setting PATH for Python 3.7

The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:PATH"exportPATHaliaspython="/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7"3.:source /.bashprofile4.,[daidaideMacBookPro: adai{PATH}" export PATH alias python="/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7" 3.终端执行指令:source ~/.bash_profile 4.确认升级,执行命令 [daidaideMacBook-Pro:~ a_dai python
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:59:38)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.