Python mac安装mysqlclient的一个bug
这是一个来自mysql官方的bug,反正我是看不懂。
shuais-MBP:wxapp dandyzhang$ pipenv install mysqlclient
Installing mysqlclient...
Collecting mysqlclient
Using cached https://files.pythonhosted.org/packages/ec/fd/83329b9d3e14f7344d1cb31f128e6dbba70c5975c9e57896815dbb1988ad/mysqlclient-1.3.13.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/rw/kmt8v6lj2fb37k0kh1ggm4m40000gn/T/pip-install-rwvfazf6/mysqlclient/setup.py", line 18, in <module>
metadata, options = get_config()
File "/private/var/folders/rw/kmt8v6lj2fb37k0kh1ggm4m40000gn/T/pip-install-rwvfazf6/mysqlclient/setup_posix.py", line 60, in get_config
libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
File "/private/var/folders/rw/kmt8v6lj2fb37k0kh1ggm4m40000gn/T/pip-install-rwvfazf6/mysqlclient/setup_posix.py", line 60, in <listcomp>
libraries = [dequote(i[2:]) for i in libs if i.startswith('-l')]
File "/private/var/folders/rw/kmt8v6lj2fb37k0kh1ggm4m40000gn/T/pip-install-rwvfazf6/mysqlclient/setup_posix.py", line 13, in dequote
raise Exception("Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?")
Exception: Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ? ---------------------------------------- Error: An error occurred while installing mysqlclient!
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/rw/kmt8v6lj2fb37k0kh1ggm4m40000gn/T/pip-install-rwvfazf6/mysqlclient/ This is likely caused by a bug in mysqlclient. Report this to its maintainers.
mysqlclient的作者在源码里已经写了个exception是专门针对这个报错的,就是上面加粗的那一句黑色的链接
Wrong MySQL configuration: maybe https://bugs.mysql.com/bug.php?id=86971 ?
它说,错误的mysql配置,可能是链接里的问题。
这里就不打开链接了解释了,反正就是一个官方的bug,里面也写了怎么解决。
首先安装mysql-connector
brew install mysql-connector-c
然后修改一下mysql_config文件,当然基于安全性的考虑需要先备份一下文件
cp /usr/local/bin/mysql_config /usr/local/bin/mysql_config.backup
然后修改文件
sudo vim /usr/local/bin/mysql_config
找到对应的内容位置
# Create options
libs="-L$pkglibdir"
libs="$libs -l "
修改成
# Create options
libs="-L$pkglibdir"
libs="$libs -lmysqlclient -lssl -lcrypto"
这时候安装mysqlclient就没问题了。。
Python mac安装mysqlclient的一个bug的更多相关文章
- Mac安装mysqlclient
前言 祝大家身体健康 正文 如何在Mac上安装Python的mysqlclient模块 安装mysql brew install mysql 安装mysql-client brew install m ...
- python基础(2):python的安装、第一个python程序
1. 第一个python程序 1.1 python的安装 自己百度,这是自学最基本的,安装一路确定即可,记得path下打钩. 1.2 python的编写 python程序有两种编写方式: 1.进入cm ...
- Mac 安装 mysqlclient
尝试在虚拟环境下通过 pip 安装: pip install mysqlclient 然后报错:OSError: mysql_config not found 找到官方文档 https://githu ...
- 2. python Mac 安装 dlib
在macOS上: 从Mac App Store安装 XCode(或安装XCode命令行工具)(最低版本是:xcode8 以上) 有 homebrew 安装 有 CMAKE 安装 基础包 :numpy ...
- Python django 安装 mysqlclient 失败
使用命令安装失败: C:\Program Files (x86)\Python\Python37-\Scripts>pip3..exe install mysqlclient Collectin ...
- pytest 3.9在python 2.7下的一个bug
最在在使用pytest,用的是pytest 3.9.3,python版本为2.7.10,但一直在使用时发现总提示 File "c:\python27\Lib\json\__init__.py ...
- RHEL7.1 安装openstack juno 一个BUG
错误提示: -- :: ERROR nova.compute.manager [-] [instance: 887e5e40-ebd8--b2f7-afa2a37bdef8] Instance fai ...
- mac 安装 python mysqlclient 遇到的问题及解决方法
在 mac 上安装 mysqlclient 遇到了一些问题,查找资料很多人都遇到了同样的问题.通过资料和试验,成功了.这里记录一下,希望帮到遇到同样问题的人. 本人使用python3, 安装步骤如下: ...
- Mac OS 安装mysqlclient 遇到的坑~
最近在学习Python, 因为Django连接mysql 需要安装mysqlclient, 但Mac安装遇到各种问题,这里记录一下,避免以后再踩坑. 1. 正常情况下,安装mysqlclient ...
随机推荐
- 理解IO、NIO、 AIO
转载:https://baijiahao.baidu.com/s?id=1586112410163034993&wfr=spider&for=pc nio 同步: 自己亲自出马持银行卡 ...
- 苹果手机连接Wifi认证机制
Wifi状态保持方法和nas设备 https://patents.google.com/patent/CN106793171A/zh 基于ios终端的离线wifi热点认证方法和认证系统 https:/ ...
- Spring Security(三十一):9.6 Localization(本地化)
Spring Security supports localization of exception messages that end users are likely to see. If you ...
- Linux内核入门到放弃-时间管理-《深入Linux内核架构》笔记
低分辨率定时器的实现 定时器激活与进程统计 IA-32将timer_interrupt注册为中断处理程序,而AMD64使用的是timer_event_interrupt.这两个函数都通过调用所谓的全局 ...
- 工具篇-Spark-Streaming获取kafka数据的两种方式(转载)
转载自:https://blog.csdn.net/weixin_41615494/article/details/7952173 一.基于Receiver的方式 原理 Receiver从Kafka中 ...
- Jmeter二次开发代码(1)
package org.apache.jmeter.functions; import java.util.Collection;import java.util.LinkedList;import ...
- 删除a表中和b表相同的数据
删除a表中和b表相同的数据 - 冯索的专栏 - CSDN博客https://blog.csdn.net/wugouzi/article/details/9374329 oracle 查找A表存在B表不 ...
- Maven将远程包拉去到项目指定路径
<build> <plugins> <plugin> <artifactId>maven-dependency-plugin</artifactI ...
- Python——面向对象的特性
1.继承 定义:继承是一种创建新类的方式,在python中,新建的类可以继承一个或多个父类,父类又可称为基类或超类,新建的类称为派生类或子类 class A:pass #父类,基类,超类 class ...
- springmvc解决中文乱码问题
1 第一种情况(get接收参数): 最近在用solr做一个搜索服务,发布给手机和pc等客户端调用,调用方式为: http://www.ganbo.search/search?q="手机& ...