一、首先确定当前pthon版本

C:\Users\10937>python -V

Python 3.7.1

二、确定你本地pip是否已安装

C:\Users\10937>pip

Usage:

pip [options]

Commands:

install Install packages.

download Download packages.

uninstall Uninstall packages.

freeze Output installed packages in requirements format.

list List installed packages.

show Show information about installed packages.

check Verify installed packages have compatible dependencies.

config Manage local and global configuration.

search Search PyPI for packages.

wheel Build wheels from your requirements.

hash Compute hashes of package archives.

completion A helper command used for command completion.

help Show help for commands.

General Options:

-h, --help Show help.

--isolated Run pip in an isolated mode, ignoring environment variables and user configuration.

-v, --verbose Give more output. Option is additive, and can be used up to 3 times.

-V, --version Show version and exit.

-q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to

WARNING, ERROR, and CRITICAL logging levels).

--log Path to a verbose appending log.

--proxy Specify a proxy in the form [user:passwd@]proxy.server:port.

--retries Maximum number of retries each connection should attempt (default 5 times).

--timeout Set the socket timeout (default 15 seconds).

--exists-action Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup,

(a)bort).

--trusted-host Mark this host as trusted, even though it does not have valid or any HTTPS.

--cert Path to alternate CA bundle.

--client-cert Path to SSL client certificate, a single file containing the private key and the

certificate in PEM format.

--cache-dir

--no-cache-dir Disable the cache.

--disable-pip-version-check

Don't periodically check PyPI to determine whether a new version of pip is available for

download. Implied with --no-index.

--no-color Suppress colored output

三、安装PyMySQL

C:\Users\10937>pip install PyMySQL

Collecting PyMySQL

Downloading https://files.pythonhosted.org/packages/a7/7d/682c4a7da195a678047c8f1c51bb7682aaedee1dca7547883c3993ca9282/PyMySQL-0.9.2-py2.py3-none-any.whl (47kB)

100% |████████████████████████████████| 51kB 162kB/s

Collecting cryptography (from PyMySQL)

Downloading https://files.pythonhosted.org/packages/39/dd/43985388f82ac0b4698671e96235c6324bdf14339e21eb3647f4e5b99017/cryptography-2.3.1-cp37-cp37m-win_amd64.whl (1.3MB)

100% |████████████████████████████████| 1.3MB 85kB/s

Collecting cffi!=1.11.3,>=1.7 (from cryptography->PyMySQL)

Downloading https://files.pythonhosted.org/packages/ca/f2/e375b7469a2dfe9d1feac81a10df97f18cd771b9a10ac62ca9864b760f7c/cffi-1.11.5-cp37-cp37m-win_amd64.whl (165kB)

100% |████████████████████████████████| 174kB 39kB/s

Collecting idna>=2.1 (from cryptography->PyMySQL)

Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)

100% |████████████████████████████████| 61kB 25kB/s

Collecting six>=1.4.1 (from cryptography->PyMySQL)

Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl

Collecting asn1crypto>=0.21.0 (from cryptography->PyMySQL)

Downloading https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl (101kB)

100% |████████████████████████████████| 102kB 36kB/s

Collecting pycparser (from cffi!=1.11.3,>=1.7->cryptography->PyMySQL)

Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)

100% |████████████████████████████████| 163kB 13kB/s

Installing collected packages: pycparser, cffi, idna, six, asn1crypto, cryptography, PyMySQL

Running setup.py install for pycparser ... done

Successfully installed PyMySQL-0.9.2 asn1crypto-0.24.0 cffi-1.11.5 cryptography-2.3.1 idna-2.7 pycparser-2.19 six-1.11.0

You are using pip version 10.0.1, however version 18.1 is available.

You should consider upgrading via the 'python -m pip install --upgrade pip' command.

到此安装成功

python2安装pymysql_Python安装PyMySQL相关推荐

  1. python3安装pymysql_python安装PyMySQL

    官网操作教程:http://www.runoob.com/python3/python3-mysql.html 1.简介 PyMySQL 是在 Python3.x 版本中用于连接 MySQL 服务器的 ...

  2. python怎么安装pymysql_Python 之 PyMySQL 安装和使用

    Python具有内置的SQLite支持. 在本节中,我们将学习使用MySQL的相关概念和知识. 在早期Python版本一般都使用MySQLdb模块,但这个MySQL的流行接口与Python 3不兼容. ...

  3. python怎么安装pymysql_python安装PyMySQL

    1确定Python版本 和 scripts目录下有pip.exe 运行- cmd (管理员) –  进入后输入: python  确定版本 指定到python下scripts目录下,然后输入 pip ...

  4. python3安装pymysql_python——pymysql的安装

    pymysql是python程序连接mysql数据库的的第三方库,通过运行import pymysql 查看系统中是否有该模块,没有的话需要自行安装. 安装教程如下: 1.下载pymysql安装包,下 ...

  5. Python系列之入门篇——python2.7.13安装

    Python2.7.13 安装 说明 以下所有操作都基于centos6.9 1. Issue zlib zlib-devel是安装setuptools依赖的模块,需要在安装python之前先安装这两个 ...

  6. python27安装-二、Python2.7的安装并与Python3.8共存

    一:Python解释器为什么要2个版本? 众所周知,Python2.7是一个过渡版本. 很多公司写的项目并不是基于最新的Python3写的,在之后进行一些项目更改的时候,Python3的语法有一些并不 ...

  7. python3.8安装教程-二、Python2.7的安装并与Python3.8共存

    一:Python解释器为什么要2个版本? 众所周知,Python2.7是一个过渡版本. 很多公司写的项目并不是基于最新的Python3写的,在之后进行一些项目更改的时候,Python3的语法有一些并不 ...

  8. python27安装-linux安装python2.7

    linux自带的python是2.6版本的,用习惯了2.7.x,所以想升级python2 1.下载源码包,后面的下载链接直接在python官网找的,如果想安装更高的版本自行更换 wget https: ...

  9. python2.7安装matplotlib_Python安装Numpy和matplotlib

    注意: 下载的库名中cp27代表python2.7,其它同理. 在shell中输入import pip; print(pip.pep425tags.get_supported())可以获取到pip支持 ...

最新文章

  1. 系列篇|编写一个翻转事件极性的package
  2. Python rstrip()方法 删除 string 字符串末尾的指定字符(默认为空格).
  3. linux下挂载U盘
  4. VS2010配置QT5.5.0开发环境
  5. vue2.0路由之编程式导航
  6. boost::system::error_category相关的测试程序
  7. 对于不返回任何键列信息的 SelectCommand 不支持 UpdateCommand 的动态 SQL 生成。
  8. android 输入法sd卡,如何android扫描SD卡列出大文件
  9. 什么是数据的表分区(文章附上Server 2005分区实施方案)
  10. MySql存储过程总结
  11. const 使用方法具体解释
  12. 《计算机组成与设计(硬件/软件接口)》读书笔记
  13. samba服务端配置和客户端使用【含windows共享文件到linux】
  14. VUE+ElementUI实现div滚动条替换
  15. 【愚公系列】2021年11月 攻防世界-进阶题-MISC-055(肥宅快乐题)
  16. [枚举]ACPC:Problem B. The Lion King
  17. 美术集网校—入门学习水彩,刚需教程建议先码后看
  18. MessageBox.Show()的使用
  19. vue中watch的初次监听和深度监听
  20. python三国演义人物出场统计_Python分析《三国演义》人物出场次数,孔明第二,赵云第五...

热门文章

  1. 3ds Max 实验六 三维图形修改器的综合应用
  2. WPF 使用全局键盘(快捷键)
  3. 分裂层次聚类matlab实现,凝聚层次聚类算法matlab源码
  4. java简单的文件加密
  5. Java学习路线-五大步骤让你入门到精通
  6. Runnable和Thread比较
  7. IOS 高德地图获取用户导航路径
  8. 运营商 html劫持 原理,域名劫持、运营商流量劫持的现象及分析
  9. Sunnyvale诊所使用RTLS系统,大幅提升患者满意度
  10. android textview坐标,android – 获取TextView中文本的位置