py mysql 安装过程遇到的问题

py mysql 安装过程遇到的问题

1. error: command 'C:\\Program Files (x86)\\Common Files\\Microsoft\\Visual C++ for

  Python\\9.0\\VC\\Bin\\cl.exe' failed with  exit  status 2
solve: 下载MySQL-python-1.2.3.win-amd64-py2.7.exe



 



 
2. 安装 的 py  版本不是 64 为 会导致,及时安装了 mysql  并解决上面问题,import 还是出错 出现


 python ImportError: DLL load failed: %1 不是有效的 Win32 应用程序

solve : 删除文件 python27 重新安装 64位 



 
 

 

 

 3. sys encoding error



 

 solve : /Lib/site.py

 

 还有一种 每次在代码里面写上 

reload(sys)
sys.setdefaultencoding('utf8')

 4. linux pip install mysql-python error



 

 solve: 

linux  安装 mysql 是 yum install mysql-client mysql-server -y

加上一句 yum install mysql-devel -y

捐助开发者

在兴趣的驱动下,写一个免费的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(支持支付宝和微信捐助,加入it技术扣扣群),没钱捧个人场,谢谢各位。



 
 
 谢谢您的赞助,我会做的更好!

猜你喜欢

转载自knight-black-bob.iteye.com/blog/2374376