当前位置:网站首页>Install mysqldb in mac10.14
Install mysqldb in mac10.14
2022-07-31 05:47:00 【ham programming】
Content
Install mysqldb in python2.7. As the mysql version increases, the libmysqlclient.dylib version will also increase. If it is mysql version 5.7, the corresponding version should be libmysqlclient.18.dylib, so you must readclear!My mysql version is 8.0.12, so the corresponding libmysqlclient version is 21. When I download it, use the command to download mysqldb, as follows:
1. Install the mysql version, the installation tutorial address: Mac installation mysql detailed tutorial
2.sudo install mysqldb
Then enter the python environment to import mysqldb, appear:
As can be seen from the reported problem, trying to load the libmysqlclient packageBut it was not found from this path, so there are several solutions, configure environment variables, and establish symbolic links. The editor uses the second solution.
Actually I found that the library is located in my downloaded mysql path: /usr/local/mysql/lib, I should now make the search path change to my this library.The default lookup library for mysqldb is /usr/local/lib
3.bash-3.2$ sudo ln -s /usr/local/mysql/lib/libmysqlclient.21.dylib /usr/local/lib/libmysqlclient.21. dylib
After repeating the above import mysqldb, the following situation occurs:
Even if it is normal!
Summary:
Don't panic when you encounter problems, you must do some analysis yourself first!
边栏推荐
猜你喜欢

vulhub靶场学习日记SickOs1.2

Sword Point Offer Special Assault Edition ---- Day 2

gin框架学习-Casbin入门指南(ACL、RBAC、域内RBAC模型)

leetcode-2321. 拼接数组的最大分数(差分+枚举)

Flask-based three-party login process

继承、Super,重写、抽象类、抽象方法 1(第七天)

vulhub靶场学习日记hackme2

数字取证autopsy工具用法

剑指offer基础版 ---- 第27天

Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
随机推荐
Redis:简单实用
碎片化NFT(Fractional NFT)
第7章 网络层第3次练习题答案(第三版)
uni-app进阶之内嵌应用【day14】
The TOKEN value of Kubernetes joining the cluster expires
vulhub靶场学习日记xxe-lab
feign调用不通问题,JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
02 【el和data的两种写法 MVVM模型】
代码块、Package,Import,封装(第六天)
【Elastic-Job源码分析】——作业监听器
NFT:数字所有权的核心
gin框架学习-Casbin进阶之策略管理API使用方法
wpf ScrowViewer水平滚动
C语言实验三 选择结构程序设计
leetcode-每日一题1252. 奇数值单元格的数目(模拟优化)
Regular Expression Basics
阿里云中mysql数据库被攻击了,最终数据找回来了
12 【网页布局总结 元素的显示与隐藏】
Flink sink redis writes to Redis
leetcode-每日一题735. 行星碰撞(栈模拟)