操作MySQL-数据库的安装及Pycharm模块的导入
1.基于pyCharm开发环境,在CMD控制台输入依次输入以下步骤:
(1)pip3 install PyMySQL < 安装 PyMySQL >
C:\Users\Administrator> pip3 install PyMySQL
Collecting PyMySQL
Downloading https://files.pythonhosted.org/packages/ed/39/15045ae46
968dfcba0396c161c20f855f11dea6796bcaae95/PyMySQL-0.9.3-py2.py3-none-a
B)
42% |█████████████▊ | 20kB 105kB/s
64% |████████████████████▋ | 30kB
85% |███████████████████████████▌
100% |██████████████████████████████
85kB/s
Installing collected packages: PyMySQL
Successfully installed PyMySQL-0.9.3
(2)pip list < 展示pip安装列表 >
C:\Users\Administrator>pip list
DEPRECATION: The default format will switch to columns in the future. You can us
e --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.con
f under the [list] section) to disable this warning.
certifi (2019.3.9)
chardet (3.0.4)
idna (2.8)
itchat (1.3.10)
pip (9.0.1)
PyMySQL (0.9.3)
pypng (0.0.19)
PyQRCode (1.2.1)
requests (2.21.0)
setuptools (28.8.0)
urllib3 (1.24.1)
2.在Pycharm任意.py文件中输入:import pymysql < 如果不报错则,安装成功>
报错访问此地址:https://blog.csdn.net/wujf90/article/details/79181886/