环境:
Windows 10
Python 2.7
需要安装mysql-python相关模块
C:Python27Scripts>pip2 install MySQLdb
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting MySQLdb
Could not find a version that satisfies the requirement MySQLdb (from versions: )
No matching distribution found for MySQLdb
发现并不是 MySQLdb,而是mysql .
于是 需要下载驱动:
64位: MySQL-python-1.2.3.win-amd64-py2.7.exe
32位: MySQL-python-1.2.5.win32-py2.7.exe
在安装时遇到以下问题:
安装MySQL-python-1.2.3.win-amd64-py2.7.exe,时提示:Python version 2.7 required, which was not found in the registry
这是在注册表不能识别python2.7,原因windows是64位,安装的python是32位
备注: MySQLdb for python (32/64位)下载;http://www.codegood.com/arch
最后
以上就是舒适大白最近收集整理的关于Windows 10 环境下python2.7 安装 mysql-python的全部内容,更多相关Windows内容请搜索靠谱客的其他文章。
发表评论 取消回复