安装mysqlclient, 链接mysql失败,提示“Library not loaded: @rpath/libmysqlclient.21.dylib”
问题:
>>> import MySQLdb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/anaconda3/envs/LearnDjango/lib/python2.7/site-packages/MySQLdb/__init__.py", line 18, in <module>
import _mysql
ImportError: dlopen(/anaconda3/envs/LearnDjango/lib/python2.7/site-packages/_mysql.so, 2): Library not loaded: @rpath/libmysqlclient.21.dylib
Referenced from: /anaconda3/envs/LearnDjango/lib/python2.7/site-packages/_mysql.so
Reason: image not found
解决办法:
1、关闭csrutil
2、找到mysql安装路径,建立软连接
sudo ln -s /usr/local/mysql/lib/libmysqlclient.21.dylib /usr/lib/libmysqlclient.21.dylib
安装mysqlclient, 链接mysql失败,提示“Library not loaded: @rpath/libmysqlclient.21.dylib”的更多相关文章
- win2012R2安装net4.6.2失败提示“更新2919355包问题,或者win8.1、win10”的错误
前言 在客户的服务器电脑安装net4.6,提示安装失败错误,最后顺利成功安装net4.6. 一.错误 1.win2012R2安装net4.6.2失败提示“更新2919355包问题,或者win8.1.w ...
- 安装wamp,访问主页提示PHP configuration loaded file……
安装wamp,访问主页提示PHP configuration loaded file…… *** ERROR *** The PHP configuration loaded file is: - s ...
- iOS 报错信息: dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from
新建项目,引入framework,运行时出现警告:dyld: Library not loaded: @rpath/RLLibrary.framework/RLLibrary Referenced ...
- Solve Error: Library not loaded: @rpath/RoutingHTTPServer.framework/RoutingHTTPServer
在配置WebDriverAgent的时候,可能会遇到如下的错误: 2018-01-04 09:53:42.759370-0600 WebDriverAgentRunner-Runner[318:133 ...
- Swift真机调试时报错dyld: Library not loaded: @rpath/libswiftCore.dylib
dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/ ...
- dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: /private/var/mobile/Conta
dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: /private/var/mobile/Cont ...
- ios dyld: Library not loaded: @rpath/xxx.framework/xxx 之根本原因
碰到问题 dyld: Library not loaded: @rpath/xxx.framework/xxx Referenced from: /var/containers/Bundle/Appl ...
- JDBC链接Mysql失败
错误信息:Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionExc ...
- net start mysql 失败提示“NET HELPMSG 3534”
lz使用的window系统8.0.16版本的mysql,以下四步解决如上问题: 1. mysqld -remove 2. mysqld --initialize 3.mysqld -install(m ...
随机推荐
- [C++] Pen questions & linux cmd
1.宏替换,完全展开替换,注意带来副作用 #include <stdio.h>#define 打印语句 printf(“hello”); Void main(void) { If (1) ...
- Python守护进程(多线程开发)-乾颐堂
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 3 ...
- ant+proguard签名打包 .jar
ant+proguard签名打包 .jar 摘自: https://blog.csdn.net/a_ycmbc/article/details/53432812 2016年12月02日 14:52:3 ...
- Oracle——分页查询
查询员工表中,工资排名在10-20之间的员工信息. select * from( select rownum rn ,employee_id,salary from ( select employee ...
- springboot启动正常,访问restController报404
原因:spring boot只会扫描启动类当前包和以下的包 比如以下: 主类:Application放在包com.springboot.main controller类放在包com.springboo ...
- save is not valid without active transaction
org.hibernate.HibernateException: save is not valid without active transaction at org.hibernate.cont ...
- vscode填坑之旅: vscode设置中文,设置中文不成功问题
刚安装好的vscode界面显示中文,如何设置中文呢? 在locale.json界面设置”locale":"zh-cn"也未能实现界面为中文,在网上找了参考了,以下教程真实 ...
- SQL*Plus用法指南
SQL是一种命令式的语言,它是用户操作数据库的最重要的一种方式.SQL语句在执行时,需要有一个执行环境. 开发人员在开发软件时,最终的结果是形成一个应用程序.在应用程序中可以嵌入SQL语句,利用这些S ...
- 练习题。对DOM中document的深刻理解巩固
//window.onload = modTwo; 1.点击单元格内容 弹窗promrt接收值 将接受的值提换单元格内容 2.点击单元格 出现2个按钮 加粗 字体颜色标红 ...
- CentOS中安装Java环境 jdk
一. 在CentOS中只需要先移除自带的OpenJava,再安装原生的Java SDK. <1> rpm -qa | grep jdk: 也就是query all npm 包,找 ...