win10如何安装python模块_win10下安装mysql-python模块

安装MySQL-python报错比较多,但不关mysql的事

Windows下安装MySQLdb遇到的问题及解决方法

>pip install MySQL-python

error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).

Get it from http://aka.ms/vcpython27

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

按上面提示到http://aka.ms/vcpython27下载安装后执行VCForPython27.msi后仍然报下面的错误:

_mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h':

No such file or directory

error: command 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Common\\

Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit

status 2

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

解决办法:搜索或者到下面网址下载安装:MySQL-python-1.2.3.win-amd64-py2.7.exe

MySQL-python 1.2.3 for Windows and Python 2.7, 32bit and 64bit versions | codegood

http://www.codegood.com/archives/129

安装后再用pip命令提示已经安装了

C:\Users\Administrator>pip install MySQL-python

Requirement already satisfied (use --upgrade to upgrade): MySQL-python in d:\pyt

hon27\lib\site-packages

在pycharm里 File -> Settings -> Python interpreter 里面添加MySQL-python就可以了

=======================================

下面是设置的截图:

如果配置成功后仍然报错,那么就重启电脑,再不行,就把电脑砸了吧,哈哈哈哈

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值