Mac upgrade python3

1- Download the latest version of python

Download the latest version of python
, such as version 3.6, the default installation location is: /Library/Frameworks/Python.framework/Versions/version number/

2- Open the terminal and modify the ~/.bash_profile file

export PATH=/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}

source ~/.bash_profile

check

$ python3
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 03:03:55)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

3-pycharm set python version

pycharm set python version

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324810598&siteId=291194637