There is a project to install recently MySQL-python/1.2.5 Failed all the time .

Environmental Science :

win7

python3.6.2

The error information is as follows :

Creating library build\temp.win32-3.6\Release\_mysql.cp36-win32.lib and o
bject build\temp.win32-3.6\Release\_mysql.cp36-win32.exp
    mysqlclient.lib(typelib.obj) : error LNK2001: unresolved external symbol ___
iob_func
    mysqlclient.lib(viosslfactories.obj) : error LNK2001: unresolved external sy
mbol ___iob_func
    mysqlclient.lib(my_winfile.obj) : error LNK2001: unresolved external symbol
___iob_func
    mysqlclient.lib(my_messnc.obj) : error LNK2001: unresolved external symbol _
__iob_func
    mysqlclient.lib(client.obj) : error LNK2001: unresolved external symbol ___i
ob_func
    mysqlclient.lib(my_thr_init.obj) : error LNK2001: unresolved external symbol
 ___iob_func
    mysqlclient.lib(my_init.obj) : error LNK2001: unresolved external symbol ___
iob_func
    mysqlclient.lib(default.obj) : error LNK2001: unresolved external symbol ___
iob_func
    mysqlclient.lib(default.obj) : error LNK2001: unresolved external symbol _pr
intf
    build\lib.win32-3.6\_mysql.cp36-win32.pyd : fatal error LNK1120: 2 unresolve
d externals
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\B
IN\\link.exe' failed with exit status 1120

----------------------------------------
Command "d:\programs\python36-32\python.exe -u -c "import setuptools, tokenize;_
_file__='C:\\Users\\code65\\AppData\\Local\\Temp\\pip-build-utscjthe\\mysql-pyth
on\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace(
'\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
C:\Users\code65\AppData\Local\Temp\pip-784mj8vx-record\install-record.txt --sing
le-version-externally-managed --compile" failed with error code 1 in C:\Users\co
de65\AppData\Local\Temp\pip-build-utscjthe\mysql-python\

According to a lot of online solutions are failures , It turns out that because of MySQLdb The module doesn't support Python3.x, therefore Python3.x If you want to connect MySQL Need to install pymysql modular .

Reference from http://www.cnblogs.com/hank-chen/p/6624299.html

D:\Python>pip install pymysql
Collecting pymysql
  Downloading PyMySQL-0.7.11-py2.py3-none-any.whl (78kB)
    38% |████████████▌                   | 30kB 111kB/s eta 0:00:01
    51% |████████████████▋               | 40kB 117kB/s eta 0:0
    64% |████████████████████▊           | 51kB 127kB/s eta
    77% |█████████████████████████       | 61kB 151kB/s
    90% |█████████████████████████████   | 71kB 165
    100% |████████████████████████████████| 81kB
 179kB/s
Installing collected packages: pymysql
Successfully installed pymysql-0.7.11

python3.6 Connect mysql More articles on database issues

  1. python3.4 Connect mysql Database method

    python3.4 Connect mysql Database method Release time :2014-08-04 edit :www.jbxue.com This paper introduces python3.4 Connect mysql Database method , stay python3.4 You can't use mys ...

  2. python3.6 Connect mysql database

    ==================pymysql=================== because MySQLdb The module doesn't support Python3.x, therefore Python3.x If you want to connect MySQL Need to install ...

  3. python3 django Connect mysql database

    stay django Migrate data from model classes to mysql In the database , use first pip install pymysql install pymysql library , And then in the project __init__.py Add import pymysql ...

  4. Python3 pymysql Connect MySQL database

    #!/usr/bin/python # -*- coding:utf8 -*- import pymysql # Get the database connection object conn = pymysql.connect(host='127.0 ...

  5. python3.4 How to connect mysql pymysql Connect mysql database

    This paper introduces python3 4 Connect mysql Database method , stay python3 4 The original python2 7 Of mysqldb Unable to connect mysql Database , have access to pymysql.   stay python3.4 ...

  6. python3 Use PyMysql Connect mysql database

    python Linguistic 3 x Completely incompatible , That leads us to python2 x The library that can be used normally in , here we are python3 It won't work for instance mysqldb at present MySQLdb Does not support python3 python Linguistic 3 ...

  7. Python3.x Use PyMysql Connect MySQL database

    Python3.x Use PyMysql Connect MySQL database because Python3.x Not forward compatible , Lead to Python2.x Many of the libraries in Python3.x Not available in , for example Mysqldb, I wrote a blog the other day Py ...

  8. Python3.x: Use PyMysql Connect Mysql database

    Python3.x: Use PyMysql Connect Mysql database Python3.x Completely incompatible , Lead to Python2.x The library that can be used normally in , here we are Python3 Can't use : for instance mysqldb, at present MySQ ...

  9. python3 Connect MySQL Database instance

    #python3 Connect MySQL example import pymysql """ Import connection MySQL Need to pack , No installation pymysql You need to install Use the command line to switch to python The installation of the road ...

Random recommendation

  1. turn :HIBERNATE some _ Method _@ annotation _ Code example --- It's very good

    HIBERNATE some _ Method _@ annotation _ Code example operation database 7 step : 1 Create a SessionFactory object 2 establish Session object 3 Open transaction Transaction : hibernate ...

  2. Arch Linux sudo: PAM authentication error: Module is unknown [Solved!]

    Problem description : my Arch Linux It has been used for more than half a year , because Arch Linux The problem of roll on , I've never upgraded the system directly . Software versions and libraries are naturally a little behind . Just before I'm ready to use NFS when , Mount network file system ...

  3. use mtrace Check for memory leaks

    http://blog.csdn.net/ixidof/article/details/6638066 Memory leak checking methods (for Linux)  If you want to read the original document more , Please refer to glibc info Of &qu ...

  4. Open-falon Monitor the installation process

    Open-falon Monitor the installation process   Specific reference :   http://book.open-falcon.org/zh/quick_install/prepare.html 1. install ntp.vim Editor ...

  5. BZOJ 4408 Mysterious number

    The method to solve the problem is the same as that of the gods ... #include<iostream> #include<cstdio> #include<cstring> #include<alg ...

  6. [Yii2]Unable to verify your data submission( The information you submitted cannot be verified )

    Yii2 in , Use form Submit data , Will prompt : [yii\web\HttpException:400] exception 'yii\web\BadRequestHttpException' with m ...

  7. Tencent cloud + The campus support program is bug Or welfare

    Preface In the morning, I suddenly received a wechat message from my friend . It's about Tencent cloud " cloud + Campus support program ". It means that users can spend 360 Dayang purchased Tencent cloud server and configured it as 1 nucleus 2G,1M Bandwidth servers 3 year .( tencent ...

  8. Ubuntu Installation under system CodeBlocks

    This article is originated from the dream of wasteland , Link to the original text :http://zhaokaifeng.com/?p=616 1 add to CodeBlocks Software warehouse of sudo add-apt-repository ppa:damien- ...

  9. The Preliminary Contest for ICPC China Nanchang National Invitational I. Max answer ( Monotonic stack + Line segment tree )

    Topic link :https://nanti.jisuanke.com/t/38228 The main idea of the topic : The value of an interval is equal to the sum of the interval multiplied by the minimum value of the interval . Give an example that contains n Sequence of Numbers ( The values of the sequence are positive and negative ), Find the largest interval of the sequence ...

  10. redis Simple design principle of mutex 【 primary 】

    redis Mutex design Mode one : Use set(arg1,arg2,arg3,arg4,arg5) The green line part of the code // If it doesn't exist, set , And set successfully 60 Seconds later key Automatic failure , Success returns a string "OK ...