python3怎么安装mysql_Python3.4无法安装mysql-python

1586010002-jmsa.png

# pip3.4 install mysql-python

Downloading/unpacking mysql-python

Downloading MySQL-python-1.2.5.zip (108kB): 108kB downloaded

Running setup.py (path:/tmp/pip_build_root/mysql-python/setup.py) egg_info for package mysql-python

Traceback (most recent call last):

File "", line 17, in

File "/tmp/pip_build_root/mysql-python/setup.py", line 13, in

from setup_posix import get_config

File "/tmp/pip_build_root/mysql-python/setup_posix.py", line 2, in

from ConfigParser import SafeConfigParser

ImportError: No module named 'ConfigParser'

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "", line 17, in

File "/tmp/pip_build_root/mysql-python/setup.py", line 13, in

from setup_posix import get_config

File "/tmp/pip_build_root/mysql-python/setup_posix.py", line 2, in

from ConfigParser import SafeConfigParser

ImportError: No module named 'ConfigParser'

----------------------------------------

Cleaning up...

Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/mysql-python

Storing debug log for failure in /root/.pip/pip.log

解决方案

Resolved:

pip3.4 install --allow-external mysql-connector-python

Edit settings.py

'ENGINE': 'mysql.connector.django',

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值