Python 3.4.0 with MySQL database

前端 未结 11 2561
孤城傲影
孤城傲影 2020-11-27 14:56

I have installed Python version 3.4.0 and I would like to do a project with MySQL database. I downloaded and tried installing MySQL

11条回答
  •  甜味超标
    2020-11-27 15:26

    I solved it this way: download the zipped package from here and follow this set of instructions:

    unzip  /path/to/downloads/folder/mysql-connector-python-VER.zip  
    

    In case u got a .gz u can use ->

    tar xzf mysql-connector-python-VER.tar.gz 
    

    And then:

    cd mysql-connector-python-VER  # move into the directory
    
    sudo python3 setup.py install # NOTICE I USED PYTHON3 INSTEAD OF PYTHON
    

    You can read about it here

提交回复
热议问题