Can't install mysql-python version 1.2.5 in Windows

来源:http://www.cnblogs.com/kungfupanda/archive/2016/08/16/5774905.html
-Advertisement-
Play Games

Can't install mysql-python version 1.2.5 in Windows http://stackoverflow.com/questions/37092125/cant-install-mysql-python-version-1-2-5-in-windows No ...


 

Can't install mysql-python version 1.2.5 in Windows

             http://stackoverflow.com/questions/37092125/cant-install-mysql-python-version-1-2-5-in-windows  
No problem. We won't show you that ad again. Why didn't you like it?
Oops! I didn't mean to do this.
         up vote0down votefavorite  

I have mysql-python v1.2.4 installed just fine on my machine (Windows 8). I am using Python 2.7. I always got this below error every time I try to upgrade to v1.2.5.

C:\Users\User\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\

9.0\VC\Bin\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversion_info=(1,2,5,'fi nal',1) -D__version__=1.2.5 "-IC:\Program Files (x86)\MySQL\MySQL Connector C 6.  0.2\include" -Ic:\python27\include -Ic:\python27\PC /Tc_mysql.c /Fobuild\temp.wi n32-2.7\Release_mysql.obj /Zl      _mysql.c      _mysql.c(42) : fatal error C1083: Cannot open include file: 'config-win.h': No such file or directory      error: command 'C:\Users\User\AppData\Local\Programs\Common\Microsoft \Visual  C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

----------------------------------------   Rolling back uninstall of mysql-python Command "c:\python27\python.exe -u -c "import

setuptools, tokenize;file='c:\  \users\user\appdata\local\temp\pip-build-utz7of\MySQL-python\setup.py';ex  ec(compile(getattr(tokenize, 'open',  open)(file).read().replace('\r\n', '\n' ), file, 'exec'))"  install --record c:\users\user\appdata\local\temp\pip-osy  _cg-record\install-record.txt --single-version-externally-managed --compile" fai led with error code 1 in c:\users\user\appdata\local\temp\pip-build-utz7of\MySQL  -python\

I've tried (and none work):

  1. Installing VS2010
  2. Changing Python Path
  3. Using Wheel module (I got Failed building wheel for MySQL-python)
  4. Installing Python MySQL connector. For both Python and C.
  5. Installing mysqlclient
  6. Installing using Exe installer from https://pypi.python.org/pypi/mysql-python/1.2.5

Do I miss something? Thanks.

    
share|improve this question edited May 14 at 17:57          Magnus Lind Oxlund         54212                 asked May 7 at 18:21          Aminah Nuraini         1,8361026        

 

 

 

                                                                                                                    
I don't understand why do I get a down vote. It is similar to some questions, but I've tried their solution and none work. Please explain the down vote reason if you want to act that way                     – Aminah Nuraini                 May 9 at 4:28                                                                            
                                                                                                                    
What happened when you used the exe installer?                     – Burhan Khalid                 May 9 at 4:46                                                                            
                                                                                                                    
It got installed just fine, but then I still fail to install mysql-python                     – Aminah Nuraini                 May 9 at 4:49                                                                            
                                                                                                                    
How do you know it failed? Did you try to import it and get an error?                     – Burhan Khalid                 May 9 at 5:24                                                                            
                                                                                                                    
I keep getting the error I've pasted in the question. Can't find config-win.h, etc.                     – Aminah Nuraini                 May 9 at 5:54                                                                            
 |              show 1 more comment        

1 Answer                                 1

            active                     oldest                     votes
         up vote0down voteaccepted

I solved it myself.

I use the wheel installer from http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python.

There are two wheel packages there. The amd64 one refuses to install on my platform (Windows) but the other one works just fine. I mean the file with this name:

MySQL_python-1.2.5-cp27-none-win32.whl

Then install it by running this below command in the same folder with the wheel package.

pip install MySQL_python-1.2.5-cp27-none-win32.whl
share|improve this answer

您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • Hive是為瞭解決hadoop中mapreduce編寫困難,提供給熟悉sql的人使用的。只要你對SQL有一定的瞭解,就能通過Hive寫出mapreduce的程式,而不需要去學習hadoop中的api。 在部署前需要確認安裝jdk以及Hadoop 如果需要安裝jdk以及hadoop可以參考我之前的博客 ...
  • 存儲過程 一 存儲過程的概念 存儲過程是在資料庫管理系統保存的,預先編譯的,能實現某種功能的SQL程式,它是資料庫應用中運用比較廣泛的一種數據對象。 為什麼需要存儲過程? 1.存儲過程只在創造時進行編譯,以後每次執行存儲過程都不需再重新編譯,而一般SQL語句每執行一次就編譯一次,所以使用存儲過程可提 ...
  • 今天在做統計數據的時候,傳入數組導致數據不顯示。解決方式和大家分享一下: --參數@CompanyName='北京,天津,上海' DECLARE @PointerPrev int DECLARE @PointerCurr int DECLARE @TName nvarchar(100) Set @P ...
  • MySQL的複製是基於binlog來實現的。 流程如下 涉及到三個線程,主庫的DUMP線程,從庫的IO線程和SQL線程。 1. 主庫將所有操作都記錄到binlog中。當複製開啟時,主庫的DUMP線程根據從庫IO線程的請求將binlog中的內容發送到從庫。 2. 從庫的IO線程接受到主庫DUMP線程發 ...
  • PyMySQL Evaluation This page will capture issues related to Openstack moving to the PyMySQL driver for MySQL/MariaDB dbapi access. Rationale While the ...
  • HQL DML 主要涉到對Hive表中數據操作,包含有:load、INSERT、DELETE、EXPORT and IMPORT,詳細資料參見:https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML 目錄: Loadin ...
  • http://smilejay.com/2013/03/python3-mysql-connector/ Python 2.x 上連接MySQL的庫倒是不少的,其中比較著名就是MySQLdb(Django項目都使用它;我也在開發測試系統時也使用過),見:http://sourceforge.net/ ...
  • 本文介紹了python3 4連接mysql資料庫的方法,在python3 4中使用原來python2 7的mysqldb已不能連接mysql資料庫了,可以使用pymysql。 在python3.4中使用原來python2.7的mysqldb已不能連接mysql資料庫了,可以使用pymysql,來完成 ...
一周排行
    -Advertisement-
    Play Games
  • 移動開發(一):使用.NET MAUI開發第一個安卓APP 對於工作多年的C#程式員來說,近來想嘗試開發一款安卓APP,考慮了很久最終選擇使用.NET MAUI這個微軟官方的框架來嘗試體驗開發安卓APP,畢竟是使用Visual Studio開發工具,使用起來也比較的順手,結合微軟官方的教程進行了安卓 ...
  • 前言 QuestPDF 是一個開源 .NET 庫,用於生成 PDF 文檔。使用了C# Fluent API方式可簡化開發、減少錯誤並提高工作效率。利用它可以輕鬆生成 PDF 報告、發票、導出文件等。 項目介紹 QuestPDF 是一個革命性的開源 .NET 庫,它徹底改變了我們生成 PDF 文檔的方 ...
  • 項目地址 項目後端地址: https://github.com/ZyPLJ/ZYTteeHole 項目前端頁面地址: ZyPLJ/TreeHoleVue (github.com) https://github.com/ZyPLJ/TreeHoleVue 目前項目測試訪問地址: http://tree ...
  • 話不多說,直接開乾 一.下載 1.官方鏈接下載: https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads 2.在下載目錄中找到下麵這個小的安裝包 SQL2022-SSEI-Dev.exe,運行開始下載SQL server; 二. ...
  • 前言 隨著物聯網(IoT)技術的迅猛發展,MQTT(消息隊列遙測傳輸)協議憑藉其輕量級和高效性,已成為眾多物聯網應用的首選通信標準。 MQTTnet 作為一個高性能的 .NET 開源庫,為 .NET 平臺上的 MQTT 客戶端與伺服器開發提供了強大的支持。 本文將全面介紹 MQTTnet 的核心功能 ...
  • Serilog支持多種接收器用於日誌存儲,增強器用於添加屬性,LogContext管理動態屬性,支持多種輸出格式包括純文本、JSON及ExpressionTemplate。還提供了自定義格式化選項,適用於不同需求。 ...
  • 目錄簡介獲取 HTML 文檔解析 HTML 文檔測試參考文章 簡介 動態內容網站使用 JavaScript 腳本動態檢索和渲染數據,爬取信息時需要模擬瀏覽器行為,否則獲取到的源碼基本是空的。 本文使用的爬取步驟如下: 使用 Selenium 獲取渲染後的 HTML 文檔 使用 HtmlAgility ...
  • 1.前言 什麼是熱更新 游戲或者軟體更新時,無需重新下載客戶端進行安裝,而是在應用程式啟動的情況下,在內部進行資源或者代碼更新 Unity目前常用熱更新解決方案 HybridCLR,Xlua,ILRuntime等 Unity目前常用資源管理解決方案 AssetBundles,Addressable, ...
  • 本文章主要是在C# ASP.NET Core Web API框架實現向手機發送驗證碼簡訊功能。這裡我選擇是一個互億無線簡訊驗證碼平臺,其實像阿裡雲,騰訊雲上面也可以。 首先我們先去 互億無線 https://www.ihuyi.com/api/sms.html 去註冊一個賬號 註冊完成賬號後,它會送 ...
  • 通過以下方式可以高效,並保證數據同步的可靠性 1.API設計 使用RESTful設計,確保API端點明確,並使用適當的HTTP方法(如POST用於創建,PUT用於更新)。 設計清晰的請求和響應模型,以確保客戶端能夠理解預期格式。 2.數據驗證 在伺服器端進行嚴格的數據驗證,確保接收到的數據符合預期格 ...