mac下pip install -r requirements.txt安裝mysqlclient報(bào)錯(cuò)
```bash
Collecting mysqlclient==2.1.1 (from -r requirements.txt (line 17))
Using cached mysqlclient-2.1.1.tar.gz (88 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
[end of output]
主要報(bào)錯(cuò)信息:
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
OSError: mysql_config not found
我安裝的是mysql8.0,在vscode終端輸入mysql提示找不到
添加mysql路徑后在編輯器終端進(jìn)行測(cè)試,提示如下證明OK了文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-608375.html
% PATH="$PATH":/usr/local/mysql/bin
% mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
主要原因是沒有設(shè)置環(huán)境變量導(dǎo)致無(wú)法識(shí)別路徑文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-608375.html
到了這里,關(guān)于/bin/sh: mysql_config: command not found的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!