日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

mac pip安装mysql_Mac pip安装mysql-python失败

發(fā)布時間:2025/3/15 数据库 21 豆豆
生活随笔 收集整理的這篇文章主要介紹了 mac pip安装mysql_Mac pip安装mysql-python失败 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

我從網(wǎng)站上安裝了

MySQL和Workbench.我有一個django項目的requirements.txt:

Django==1.11.12

djangorestframework==3.8.2

django-cors-headers==2.2.0

drfdocs==0.0.11

mysql-python==1.2.5

django-rest-auth==0.9.3

django-allauth==0.35.0

nltk==3.2.5

django-extensions==2.0.7

pyparsing==2.2.0

pydot==1.2.4

我跑的時候

pip install -r requirements.txt

我找不到mysql_config錯誤.為了解決這個問題我跑了

PATH=$PATH:/usr/local/mysql/bin

它現(xiàn)在拋出

_mysql.c:44:10: fatal error: 'my_config.h' file not found

#include "my_config.h"

^~~~~~~~~~~~~

1 error generated.

error: command 'cc' failed with exit status 1

----------------------------------------

Command ""/Users/nitish/gitProjects/Vision Backlog/vb_env/bin/python" -u -c "import setuptools, tokenize;__file__='/private/var/folders/ql/_w2_rlvs2351pdcnzhn04sf40000gn/T/pip-install-M4ue9E/mysql-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/ql/_w2_rlvs2351pdcnzhn04sf40000gn/T/pip-record-7OCzf1/install-record.txt --single-version-externally-managed --compile --install-headers "/Users/nitish/gitProjects/Vision Backlog/vb_env/include/site/python2.7/mysql-python"" failed with error code 1 in /private/var/folders/ql/_w2_rlvs2351pdcnzhn04sf40000gn/T/pip-install-M4ue9E/mysql-python/

為什么會這樣?

更新:跟隨下面的解決方案拋出:

Collecting MySQL-python

Using cached https://files.pythonhosted.org/packages/a5/e9/51b544da85a36a68debe7a7091f068d802fc515a3a202652828c73453cad/MySQL-python-1.2.5.zip

Complete output from command python setup.py egg_info:

Traceback (most recent call last):

File "", line 1, in

File "/private/var/folders/ql/_w2_rlvs2351pdcnzhn04sf40000gn/T/pip-install-X6b4rU/MySQL-python/setup.py", line 17, in

metadata, options = get_config()

File "setup_posix.py", line 53, in get_config

libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag("l")) ]

File "setup_posix.py", line 8, in dequote

if s[0] in "\"'" and s[0] == s[-1]:

IndexError: string index out of range

總結

以上是生活随笔為你收集整理的mac pip安装mysql_Mac pip安装mysql-python失败的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內容還不錯,歡迎將生活随笔推薦給好友。