当前位置:网站首页>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
- If the account number or password is entered incorrectly for many times, the account will be banned.
- Detailed explanation of pointers in C language
- Volatility取证工具使用日记
- 初涉C语言
- 08 【生命周期 组件】
- 【ubuntu20.04安装MySQL以及MySQL-workbench可视化工具】
- 【JVM加载】---类加载机制
- Sword Point Offer Special Assault Edition ---- Day 2
- 2021面经-拥抱变化
猜你喜欢
随机推荐
gin框架学习-GORM框架进阶之CRUD接口(数据库增删改查操作)
踏上编程之路,你必须要干的几件事
leetcode-438. 找到字符串中所有字母异位词(滑动窗口)
leetcode-每日一题558. 四叉树交集(分治递归)
第7章 网络层第1次练习题答案(第三版)
Redis:简单实用
GUCCI、LV等奢侈品巨头如何布局元宇宙的,其他品牌应该跟上吗?
数据库学习笔记
12 【网页布局总结 元素的显示与隐藏】
C语言实验二 数据类型、运算符和表达式
Anaconda configure environment directives
leetcode-每日一题1217. 玩筹码(贪心+位运算)
Volatility取证工具使用日记
uni-app进阶之样式框架/生产环境【day10】
leetcode-每日一题745. 前缀和后缀搜索(哈希和字典树)
leetcode-每日一题735. 行星碰撞(栈模拟)
Memcached :安装
C语言实验四 循环结构程序设计(一)
gin框架学习-Casbin进阶之策略管理API使用方法
let和const命令








