mysql-python安裝時Environment Error: mysql_config not found
在安裝 mysql-python時,出現:
Collecting MySQL-python
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip (108kB)
100% |████████████████████████████████| 112kB 2.1MB/s
Complete output from command python setup.py egg_info:
sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-vkUfD6/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
可能是因為沒有安裝:libmysqlclient-dev
執行以下命令安裝:
sudo apt-get install python-dev libmysqlclient-dev
安裝後再次執行安裝 mysql-python命令:
pip install MySQL-python
成功安裝:
參考來源:mysql-python安裝時EnvironmentError: mysql_config not found
相關文章
- 安裝mysqlclient報OSError: mysql_config not foundMySqlclientError
- Mac 安裝MySQL-pythonMacMySqlPython
- error: externally-managed-environmentError
- Mac環境安裝mysqlclient報錯not fund mysql_configMacMySqlclient
- Linux解決MySQL-python安裝失敗問題LinuxMySqlPython
- PVE(Proxmox Virtual Environment) 安裝配置iStoreOS筆記筆記
- composer安裝完成輸入命令報錯:Fatal error: Class ‘Phar‘ not found in C:\\ProgramData\\ComposerSetup\\bin\\compoError
- zsh: command not found: bee bee工具安裝
- golang原始碼安裝時fatal error: MSpanList_Insert錯誤Golang原始碼Error
- [PM2][ERROR] Process XXX not foundError
- ERROR: No abbreviations files found in ...nonbreaking_prefixesError
- ubuntu進行make時報錯error: Neither flex nor lex was found.UbuntuErrorFlex
- 安裝CenOS出現“The CenOS disc was not found in any of ....”
- Session 'app': Error Launching activity(安裝包安裝失敗)SessionAPPError
- 安裝網站出現404 not found如何解決?網站
- cgo: C compiler "gcc" not found 報錯安裝gccGoCompileGC
- Flutter 安裝搭建報錯 Android sdkmanager tool not foundFlutterAndroid
- ERROR: freetype2 not found using pkg-configError
- Flutter在iOS裝置執行報錯fatal error: 'Flutter/Flutter.h' file not foundFlutteriOSError
- CentOS載入yum源時報錯 [Errno 14] HTTP Error 404 - Not Found Trying other mirror.CentOSHTTPError
- UBUNTU安裝kaldi遇到關於not install OpenFst errorUbuntuNFSError
- appium 初始化安裝的時候報錯 Error getting strings.xml from apkAPPErrorXMLAPK
- PHP 5.4 編譯 configure: error: libXpm.(a|so) not found.PHP編譯Error
- Error executing Jupyter command 'notebok': [Errno 'jupyter-notebok' not found] 2Error
- mac php8安裝swoole 'pcre2.h' file not foundMacPHP
- MySQL 5.6複製報錯Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND;MySqlError
- 安裝benchmarksql報java:143: error: unmappable character for encoding ASCIISQLJavaErrorAPPEncodingASCII
- Mac安裝Adobe軟體,提示Error解決方法MacError
- Python錯誤:PyCharm 安裝出錯 Internal error,please。。。PythonPyCharmError
- Ubuntu 20.04 安裝 php-xml 模組(報錯:Class 'DOMDocument' not found )UbuntuPHPXML
- 奇怪了,nginx環境下安裝第3部提示404 Not FoundNginx
- mac安裝,Sail up初始化時報錯,ERROR [ 5/13] RUN apt-get update...MacAIErrorapt-get
- 安裝軟體提示 Runtime Error (at 28:321): Generic faiure SwbemlocatorErrorAI
- zadig安裝winusb遭遇Error 0x800b0109Error
- CentOS 已安裝virtualenv, 但還是報錯誤 bash: virtualenv: command not foundCentOS
- [Bash] Environment variables
- Oracle environment variableOracle
- Nodejs的npm安裝模組時候報錯:npm ERR! Error: CERT_UNTRUSTED的解決方法NodeJSNPMErrorRust