- idea plugins 安装python插件
- 当clone 一个项目后发现
项目的python 版本是3+ 自己本地的python是2+ - 更新python
brew upgrade python3
- 配置环境变量
open ~/.bash_profie
配置python3的环境变量
# Setting PATH for Python 3.7
# The original version is saved in .bash_profile.pysave
PATH="/usr/local/bin/:${PATH}"
export PATH
alias python="/usr/local/bin/python3"
source ~/.bash_profile
更新配置时,出现报错
N/A: version "N/A -> N/A" is not yet installed.
You need to run "nvm install N/A" to install it before using it.
于是install 一下自己需要的版本号的node
例如
nvm install nvm install 12.14.1
再次更新一下配置文件
source ~/.bash_profile
此刻
~/Documents/regional-it/demos/dso(master*) »which python yuanli.dai@YuanlideMacBook-Pro
python: aliased to /usr/local/bin/python3
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
~/Documents/regional-it/demos/dso(master*) » which python3 yuanli.dai@YuanlideMacBook-Pro
/usr/local/bin//python3
~/Documents/regional-it/demos/dso(master*) » python --version yuanli.dai@YuanlideMacBook-Pro
Python 3.7.6
- 在idea中new project 配置sdk的环境
或者 通过已clone的项目中cmd ;
配置python的sdk
网友评论