簡體   English   中英

無法在Windows ubuntu上的python中安裝模式模塊

[英]Cannot install pattern module in python on windows ubuntu

我試圖在我的代碼中導入一個稱為模式的python模塊。 但是,當我運行時: pip install pattern

我得到以下輸出:

Collecting pattern Using cached https://files.pythonhosted.org/packages/1e/07/b0e61b6c818ed4b6145fe01d1c341223aa6cfbc3928538ad1f2b890924a3/Pattern-3.6.0.tar.gz Collecting future (from pattern) Using cached https://files.pythonhosted.org/packages/90/52/e20466b85000a181e1e144fd8305caf2cf475e2f9674e797b222f8105f5f/future-0.17.1.tar.gz Collecting backports.csv (from pattern) Using cached https://files.pythonhosted.org/packages/8e/26/a6bd68f13e0f38fbb643d6e497fc3462be83a0b6c4d43425c78bb51a7291/backports.csv-1.0.7-py2.py3-none-any.whl Collecting mysqlclient (from pattern) Using cached https://files.pythonhosted.org/packages/4d/38/c5f8bac9c50f3042c8f05615f84206f77f03db79781db841898fde1bb284/mysqlclient-1.4.4.tar.gz ERROR: Command errored out with exit status 1: command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4Proy9/mysqlclient/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4Proy9/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\\r\\n'"'"', '"'"'\\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info cwd: /tmp/pip-install-4Proy9/mysqlclient/ Complete output (12 lines): sh: 1: mysql_config: not found sh: 1: mariadb_config: not found sh: 1: mysql_config: not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-4Proy9/mysqlclient/setup.py", line 16, in <module> metadata, options = get_config() File "setup_posix.py", line 61, in get_config libs = mysql_config("libs") File "setup_posix.py", line 29, in mysql_config raise EnvironmentError("%s not found" % (_mysql_config_path,)) EnvironmentError: mysql_config not found ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我已經安裝了mysql,也嘗試安裝mysqlclient。 我不確定該怎么辦!

要構建/安裝mysqlclient,您將需要mysqlclient庫和頭文件。 為了確定它們的位置,mysqlclient需要調用mysql_config腳本(未找到)。

您需要安裝mysql客戶端庫。 (例如libmysqlclient-dev)。 還要確保mysql_config腳本在您的路徑中。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM