博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【Django】Mac 安装pip3-install-mysqlclient 报错
阅读量:4565 次
发布时间:2019-06-08

本文共 876 字,大约阅读时间需要 2 分钟。

1.首先在pip3-install-mysqlclient时报错

mysql_config not found

  

2.逛了一些博客 让安装mysql或者mysql-connector-c

我安装了后者还是报错,现在报了这个错误

 

File "
", line 1, in
File "/private/var/folders/2f/r1pwfcp521q7z9kd240tr3700000gn/T/pip-build-u8yhUI/mysqlclient/setup.py", line 17, in
metadata, options = get_config() File "setup_posix.py", line 54, in get_config libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')] File "setup_posix.py", line 12, in dequote if s[0] in "\"'" and s[0] == s[-1]: IndexError: string index out of range

  

3.最后解决方法是修改本地的mysql_config  mac的路径:/usr/local/bin/mysql_config

vi进行修改:

# Create options libs="-L$pkglibdir"libs="$libs -l "# 修改后,如下# Create options libs="-L$pkglibdir"libs="$libs -lmysqlclient -lssl -lcrypto"

  

转载于:https://www.cnblogs.com/Jack-cx/p/11380196.html

你可能感兴趣的文章
简单理解什么是递归(阶乘演示)
查看>>
http协议
查看>>
js倒计时,页面刷新时,不会从头计时
查看>>
洛谷1156垃圾陷阱
查看>>
python ==》 递归
查看>>
简单网络请求封装
查看>>
django —— MVT模型
查看>>
oracle 静默安装
查看>>
Python3基础(2)模块、数据类型及运算、进制、列表、元组、字符串操作、字典...
查看>>
服务器上centos 7 配置静态IP
查看>>
C# unsafe模式内存操作深入探索
查看>>
Redis拾遗(一)
查看>>
js字符串转换为Json对象的三种写法
查看>>
Is it possible to display icons in a PopupMenu?
查看>>
制作导航条
查看>>
iOS中的内存管理1
查看>>
23种设计模式全解析
查看>>
Learning Python 008 正则表达式-003 sub()方法
查看>>
要检测两个C文件的代码的抄袭情况
查看>>
iOS开发之应用内支付IAP全部流程
查看>>