在win7下安装了python后,想安装python-mysql,使用pip安装出现如下问题:

  • pip install MySQL-python
    build\lib.win-amd64-2.7\_mysql.pyd : fatal error LNK1120: 56 unresolved externals error: command 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exit status 1120

网上一般的解释是,重新安装mysql并在安装mysql是选择安装c++的编译器。。。
我虽然没试过,但感觉肯定行不通啊,我只是想装一个可以让python远程连接mysql的包而已,管本地mysql什么事?有些解释真是误人子弟。
但错误提示里也谢了缺少C++的相关环境,后来在网上找到方法了:
方法如下:
1.在 http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python 下载对应的包版本,如果是win7 64位2.7版本的python,就下载
MySQL_python-1.2.5-cp27-none-win_amd64.whl
然后在命令行执行pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl
当然需要在cmd下跳转到下载MySQL_python-1.2.5-cp27-none-win_amd64.whl的目录下
然后就安装成功了MySQL-python

pip install MySQL-python的更多相关文章

  1. error: Unable to find vcvarsall.bat while install python library by pip install or python setup.py install.

    Python 2.7 会搜索 Visual Studio 2008. 如果你电脑上没有这个版本的话,比如只有: 1.Visual Studio 2010,在cmd里面执行:SET VS90COMNTO ...

  2. Python 安装第三方库,pip install 安装慢,安装不上的解决办法

    今天来说一下,有些刚刚接触python的朋友,在使用pip install安装python 第三方库的过程中 会出现网速很慢,或者是安装下载到中途,停止,卡主,或者是下载报错等问题.如下图: 还有一些 ...

  3. Python学习笔记: pip install 常见错误汇总

    本机环境RHEL8, Python3.9 pip install: 无法安装最新版本的包 在pypi上查看pkg的页面,因为有些pip包的版本对特定的python版本有要求 pip install e ...

  4. MySQL——python交互

    与python交互之前我们需要安装一个MySQL的驱动模块Connector,这个驱动模块直接在cmd命令行输入 pip install mysql.connector 安装是否成功可以接着输入 py ...

  5. python pip install mysql-connector-python

    sudo pip install mysql-connector-python 报错信息:Collecting mysql-connector-python Could not find a vers ...

  6. 使用pip install mysqlclient命令安装mysqlclient失败?(基于Python)

    我们使用Django.flask等来操作MySQL,实际上底层还是通过Python来操作的.因此我们想要用Django来操作MySQL,首先还是需要安装一个驱动程序.在Python3中,驱动程序有多种 ...

  7. macosx 10.11 python pip install 出现错误OSError: [Errno 1] Operation not permitted:

    Exception: Traceback (most recent call last): File , in main status = self.run(options, args) File , ...

  8. Python: Win7下使用 pip install lxml 无法安装lxml?

    1.在网址 http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml 下,搜索lxml,下载Python对应的lxml版本.如下图: 2.打开cmd,进入到lxm ...

  9. 使用pip install 或者easy_install安装Python的各种包出现cc failed with exit status 1

    *:first-child { margin-top: 0 !important; } body > *:last-child { margin-bottom: 0 !important; } ...

  10. pip install psycopg2出现python setup.py egg_info failed with error code 1 in /tmp/pip-build-YtLeN3/psycopg2错误处理

    折腾了一上午flask部署,到最后访问域名还是出现Application Error错误提示.估计是程序还有问题,想着直接clone书中作者的代码先试试能不能部署成功.结果在执行pip install ...

随机推荐

  1. How to make an HTTP request 异步 JavaScript 和 XML

    https://developer.mozilla.org/en-US/docs/AJAX/Getting_Started In order to make an HTTP request to th ...

  2. USB--- kvm in ubuntu:

    USB SS=USB SuperSpeed=USB 3.0!!顺应此前的USB 1.1 FullSpeed和USB 2.0 HighSpeed https://jingyan.baidu.com/ar ...

  3. go语言编程入门

    查看文档 首先先分享一个可以在本地就能查看文档的骚操作(linux系统) 1.打开命令行终端,输入godoc -http=:8000,如果想后台运行在后面加个& 2.然后打开浏览器,输入网址: ...

  4. html中label及加上属性for之后的用法

    定义和用法 <label> 标签为 input 元素定义标签(label). label 元素不会向用户呈现任何特殊的样式.不过,它为鼠标用户改善了可用性,因为如果用户点击 label 元 ...

  5. ArcCatalog连接ArcSDE连接报:unable to create new database connection file,permission is denied

    参考博文:链接 ArcCatalog连接ArcSDE连接报:unable to create new database connection file,permission is denied 最近经 ...

  6. 洛谷P2661 信息传递 [NOIP2015] 并查集/乱搞 (待补充!

    感觉我好水啊,,,做个noip往年题目还天天只想做最简单的,,,实在太菜辽 然后最水的题目还不会正解整天想着乱搞,,,  虽然也搞出来辽233333 好滴不扯辽赶紧写完去做紫题QAQ 正解:并查集  ...

  7. format格式化输出

    python格式化输出,format print("""********** Screen: {size} Density: {dpi} Device: {device} ...

  8. android 代码edittext删除或者替换光标处的字串

    https://stackoverflow.com/questions/3609174/android-insert-text-into-edittext-at-current-position Cp ...

  9. Git warning:LF will be replaced by CRLF in readme.txt的原因与解决方案

    今天用Git bash遇到的问题,看了几个回答之后发现一个比较有价值的,给大家分享一下,其他很多的回答都有很或多或少存在一些弊端. 原回答地址在stackoverflow上,附上链接--http:// ...

  10. 服务器修改用户密码注意iis部署的网站问题

    当服务器修改用户密码时,需要修改iis上部署的跟此用户权限有关的所有网站,选择网站——右击——应用程序管理——高级设置——物理路径凭证——特定用户——修改用户名和密码.