MAC中PyCharm设置python3解释器

Tabitha ·
更新时间:2024-09-21
· 582 次阅读

MAC上的PyCharm中默认的python解释器是python2的,windows下的没用过不是很清楚,所以特来记录下设置python3解释器的过程。

python3的查找与安装

如果电脑中没有安装python3可以用brewhome来安装,简单记录下

// 查看python版本 python --version python3 --version // 搜索python brew search python

// 安装python3 brew install python3

然后经过一个漫长的过程就安装好了,好,圆规正题

设置PyCharm

打开PyCharm的偏好设置

// 搜索Interpreter Interpreter

点击更多按钮,选择【Create VirtualEnv】

Name随便写,位置可以跟我一样放到[.virtualenvs]下

/Users/(userName)/.virtualenvs

查看python位置

// python2 which python // python3 which python3

选择【Base interpreter】python3的执行文件位置

点击OK就好了,接下来设置python3做为默认的解释器吧

您可能感兴趣的文章:linux查找当前python解释器的位置方法Python3解释器知识点总结在Python文件中指定Python解释器的方法mac PyCharm添加Python解释器及添加package路径的方法Pycharm学习教程(4) Python解释器的相关配置Win7下搭建python开发环境图文教程(安装Python、pip、解释器)python解释器spython使用及原理解析



解释器 pycharm mac Python3 Python

需要 登录 后方可回复, 如果你还没有账号请 注册新账号