Python install MySQLdb

tags: python  mysql  Python module  Python3.7.1 connection mysql

Python connection mysql requires MySQLdb module

System environment

Windows10 home version python3.7.1
ide:sublime_text3

2. Installation instructions

  1. If it is a python 2.x version, enter it at the command line:pip install MySQLdbCan be installed successfully
  2. If it is python 3.x version, use it directlypip install MySQLdbUnable to install, then answer the installation process.

Three. python3.X installation process

  1. Web download package:https://pypi.org/project/mysqlclient/#files
  2. I am a version of python 3.7.1, so select the web page: mysqlclient-1.3.14-cp37-cp37m-win_amd64 .whl, with a 37-character package.
  3. Go to the download folder from the cmd command line and execute the following command.
    pip install mysqlclient-1.3.14-cp37-cp37m-win_amd64.whl

    appears:Sucessfully installed mysqlclient-1.3.14The installation is successful.
  4. To verify that the installation was successful, execute the following command
    python
    import MySQLdb

    can import MySQLdb module without error.
    Note: To write in accordance with MySQLdb, you should distinguish between uppercase and lowercase.

Intelligent Recommendation

Python 2.7 Install mysqldb module import mysqldb

Python 2.7 Use Report So do you execute the command and get it Execute the import mysqldb again...

Linux # centos # python # Install MySQLdb

Install pip View version: Install MySQLdb with pip operation result: Delete MySQLdb EnvironmentError: mysql_config not found problem Solution: References: https://www.liquidweb.com/kb/how-to-install-p...

Python install MySQLdb module installation

2019 Unicorn Enterprise Heavy Gold Recruitment Python Engineer Standard >>> wget https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.5.zip unzip MySQL-python-1.2.5.zi...

Python install MySQLdb module and troubleshooting

Preface Source code installation and troubleshooting used in this article, the following are other installation methods. yum installation: yum install MySQL-python -y pip installation: pip install pyt...

Install mysqldb (python-mysql) on Mac

1. Download the .tar compressed package from https://sourceforge.net/projects/mysql-python/ (the download speed is quite full, please be patient). After downloading, unzip the compressed package. 2. M...

More Recommendation

Install mysqldb (mysql-python) on the Mac

Install mysqldb on the Mac to connect to the MySQL database lab environment MacOS Sierra step 1. Premise Mysql needs to be installed, pay attention to the installation path. I have the installation pa...

Python pip Install MySQLDB abnormalities

The three errors encountered (read the error log, then match the problem), but there are far more than three errors Configuration: Mac mini (M1, 2020), Python2.7 First: The installation object is MySQ...

Macos install MySQLdb: pip install MySQL-python

1. The first step to install the mysql connector: brew install mysql-connector-c 2. After confirming the configuration of several lines in the mysql_config file, you can first use the following path t...

Django, python install MySQLdb not installed (mysql-python)

1, pip installl mysql-python can not be installed 2, install the wheel before installing MySQLdb, execute the pip install wheel command to install 3. Download the MySQL_python-1.2.5-cp27-none-win32.wh...

Python install python-mysqldb module method

The first step, go to the official websiteDownloading the corresponding package: https://pypi.python.org/pypi/mysqlclient/1.3.12 If you enter and see the following interface, please click "Latest...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top