python下载安装

https://www.python.org/downloads/
https://www.python.org/downloads/source/

python文档 https://docs.python.org/3/download.html

# Setting PATH for Python 2.7
PATH="/System/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
export PATH
# Setting PATH for Python 3.7
PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}"


alias python2='/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7'
alias python3='/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7'
alias python=python3

pip: command not found
运行Python的安装工具安装pip
sudo easy_install pip

pip install --upgrade pip
pip3 install --upgrade pip
pip3 install matplotlib -i http://pypi.douban.com/simple --trusted-host pypi.douban.com  
pip3 install numpy -i http://pypi.douban.com/simple --trusted-host pypi.douban.com  
pip3 install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com  
pip3 install seaborn scipy  -i http://pypi.douban.com/simple --trusted-host pypi.douban.com 
sqlalchemy.exc.ProgrammingError: (pymysql.err.ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'form car_brand_series' at line 1")
[SQL:  select * form car_brand_series ]
WKQ@WKQ-PC MINGW64 ~
$ python -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 17kB/s
Installing collected packages: pip
  Found existing installation: pip 9.0.1
    Uninstalling pip-9.0.1:
      Successfully uninstalled pip-9.0.1
Successfully installed pip-19.3.1

WKQ@WKQ-PC MINGW64 ~
$ python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\professionalsoftware\python\python35\lib\site-packages (19.3.1)

References

[1] Mac下安装配置Python2和Python3并相互切换使用