Centos 6.5安裝MySQL-python

報錯信息:

Using cached MySQL-python-1.2.5.zip
???? Complete output from command python setup.py egg_info:
???? sh: mysql_config: command not found
???? Traceback (most recent call last):
?????? File "<string>", line 1, in <module>
?????? File "/tmp/pip-build-Lil8nB/MySQL-python/setup.py", line 17, in <module>
???????? metadata, options = get_config()
?????? File "setup_posix.py", line 43, in get_config
???????? libs = mysql_config("libs_r")
?????? File "setup_posix.py", line 25, in mysql_config
???????? raise EnvironmentError("%s not found" % (mysql_config.path,))
???? EnvironmentError: mysql_config not found
????
???? ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Lil8nB/MySQL-python/

解決方法:(注:這里只是我遇到的問題,摸索到的解決方法,并不表示可以解決所有遇到此類的錯誤!)

[root@sishen ~]#python -m pip install --upgrade --force pip

[root@sishen ~]#pip install setuptools==33.1.1

[root@sishen ~]#yum install -y mysql-dev python-dev libmysqlclient-dev??? (紅色部分,依據個人情況安裝)

[root@sishen ~]#pip install MySQL-python

測試

[root@sishen ~]# python
Python 2.7.14 (default, Sep 20 2017, 20:34:26)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>>

這就表示已經成功安裝MySQL-python。

轉載于:https://www.cnblogs.com/zd520pyx1314/p/7790059.html

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/390893.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390893.shtml
英文地址,請注明出處:http://en.pswp.cn/news/390893.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

react 最佳實踐_最佳React教程

react 最佳實踐React is a JavaScript library for building user interfaces. It was voted the most loved in the “Frameworks, Libraries, and Other Technologies” category of Stack Overflow’s 2017 Developer Survey.React是一個用于構建用戶界面JavaScript庫。 在S…

先知模型 facebook_Facebook先知

先知模型 facebook什么是先知&#xff1f; (What is Prophet?) “Prophet” is an open-sourced library available on R or Python which helps users analyze and forecast time-series values released in 2017. With developers’ great efforts to make the time-series …

Java里面的靜態代碼塊

問題&#xff1a;Java里面的靜態代碼塊 I was looking over some code the other day and I came across: 前幾天我在看一些代碼時發現&#xff1a; static {... }我是c轉來的&#xff0c;我不知道為啥要這樣干。這個代碼也編譯成功了&#xff0c;沒出錯誤。這里的"stat…

搭建Maven私服那點事

摘要&#xff1a;本文主要介紹在CentOS7.1下使用nexus3.6.0搭建maven私服&#xff0c;以及maven私服的使用&#xff08;將自己的Maven項目指定到私服地址、將第三方項目jar上傳到私服供其他項目組使用&#xff09; 一、簡介 Maven是一個采用純Java編寫的開源項目管理工具, Mave…

lee最短路算法_Lee算法的解釋:迷宮運行并找到最短路徑

lee最短路算法Lee算法是什么&#xff1f; (What is the Lee Algorithm?) The Lee algorithm is one possible solution for maze routing problems. It always gives an optimal solution, if one exists, but is slow and requires large memory for dense layout.Lee算法是迷…

gan訓練失敗_我嘗試過(但失敗了)使用GAN來創作藝術品,但這仍然值得。

gan訓練失敗This work borrows heavily from the Pytorch DCGAN Tutorial and the NVIDA paper on progressive GANs.這項工作大量借鑒了Pytorch DCGAN教程 和 有關漸進式GAN 的 NVIDA論文 。 One area of computer vision I’ve been wanting to explore are GANs. So when m…

怎么樣實現對一個對象的深拷貝

問題&#xff1a;怎么樣實現對一個對象的深拷貝 使用深拷貝的方法有點難實現啊。要保證原來的對象和克隆對象不是共享同一個引用的步驟是什么啊&#xff1f; 回答一 一種安全的方法是先序列化對象&#xff0c;然后反序列化。這保證了所有東西都是一個新的引用。 這里有一篇…

19.7 主動模式和被動模式 19.8 添加監控主機 19.9 添加自定義模板 19.10 處理圖形中的亂碼 19.11 自動發現...

2019獨角獸企業重金招聘Python工程師標準>>> 19.7 主動模式和被動模式 ? 主動或者被動是相對客戶端來講的 ? 被動模式&#xff0c;服務端會主動連接客戶端獲取監控項目數據&#xff0c;客戶端被動地接受連接&#xff0c;并把監控信息傳遞給服務端 服務端請求以后&…

Codeforces Round #444 (Div. 2) C.Solution for Cube 模擬

向題解低頭&#xff0c;向大佬低頭(。﹏。)orz……模擬也不能亂模啊……要好好分析題意&#xff0c;簡化簡化再簡化orz敲黑板 六個面的魔方&#xff0c;能一步還原的情況一定是只有2個面是單色&#xff0c;其余四個面&#xff0c;每個面2種顏色&#xff0c;而且不會出現任意兩面…

fcc認證_介紹fCC 100:我們對2019年杰出貢獻者的年度總結

fcc認證2019 has been a big year for the global freeCodeCamp community.對于全球freeCodeCamp社區來說&#xff0c;2019年是重要的一年。 More people are answering questions on the forum. 越來越多的人在論壇上回答問題。 Our publication has several new, rising aut…

華盛頓特區與其他地區的差別_使用華盛頓特區地鐵數據確定可獲利的廣告位置...

華盛頓特區與其他地區的差別深度分析 (In-Depth Analysis) Living in Washington DC for the past 1 year, I have come to realize how WMATA metro is the lifeline of this vibrant city. The metro network is enormous and well-connected throughout the DMV area. When …

Windows平臺下kafka環境的搭建

近期在搞kafka&#xff0c;在Windows環境搭建的過程中遇到一些問題&#xff0c;把具體的流程幾下來防止后面忘了。 準備工作&#xff1a; 1.安裝jdk環境 http://www.oracle.com/technetwork/java/javase/downloads/index.html 2.下載kafka的程序安裝包&#xff1a; http://kafk…

deeplearning.ai 改善深層神經網絡 week2 優化算法

這一周的主題是優化算法。 1. Mini-batch&#xff1a; 上一門課討論的向量化的目的是去掉for循環加速優化計算&#xff0c;X [x(1) x(2) x(3) ... x(m)]&#xff0c;X的每一個列向量x(i)是一個樣本&#xff0c;m是樣本個數。但當樣本很多時&#xff08;比如m500萬&#xff09…

gcc匯編匯編語言_什么是匯編語言?

gcc匯編匯編語言Assembly Language is the interface between higher level languages (C, Java, etc) and machine code (binary). For a compiled language, the compiler transforms higher level code into assembly language code.匯編語言是高級語言(C &#xff0c;Java等…

鋪裝s路畫法_數據管道的鋪裝之路

鋪裝s路畫法Data is a key bet for Intuit as we invest heavily in new customer experiences: a platform to connect experts anywhere in the world with customers and small business owners, a platform that connects to thousands of institutions and aggregates fin…

leetcode421. 數組中兩個數的最大異或值(貪心算法)

給你一個整數數組 nums &#xff0c;返回 nums[i] XOR nums[j] 的最大運算結果&#xff0c;其中 0 ≤ i ≤ j < n 。 進階&#xff1a;你可以在 O(n) 的時間解決這個問題嗎&#xff1f; 示例 1&#xff1a; 輸入&#xff1a;nums [3,10,5,25,2,8] 輸出&#xff1a;28 解…

IBM推全球首個5納米芯片:計劃2020年量產

IBM日前宣布&#xff0c;該公司已取得技術突破&#xff0c;利用5納米技術制造出密度更大的芯片。這種芯片可以將300億個5納米開關電路集成在指甲蓋大小的芯片上。 IBM推全球首個5納米芯片 IBM表示&#xff0c;此次使用了一種新型晶體管&#xff0c;即堆疊硅納米板&#xff0c;將…

drop sql語句_用于從表中刪除數據SQL Drop View語句

drop sql語句介紹 (Introduction) This guide covers the SQL statement for dropping (deleting) one or more view objects.本指南介紹了用于刪除(刪除)一個或多個視圖對象SQL語句。 A View is an object that presents data from one or more tables.視圖是顯示來自一個或多…

async 和 await的前世今生 (轉載)

async 和 await 出現在C# 5.0之后&#xff0c;給并行編程帶來了不少的方便&#xff0c;特別是當在MVC中的Action也變成async之后&#xff0c;有點開始什么都是async的味道了。但是這也給我們編程埋下了一些隱患&#xff0c;有時候可能會產生一些我們自己都不知道怎么產生的Bug&…

項目案例:qq數據庫管理_2小時元項目:項目管理您的數據科學學習

項目案例:qq數據庫管理Many of us are struggling to prioritize our learning as a working professional or aspiring data scientist. We’re told that we need to learn so many things that at times it can be overwhelming. Recently, I’ve felt like there could be …