问题:

>>> 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”的更多相关文章

  1. win2012R2安装net4.6.2失败提示“更新2919355包问题,或者win8.1、win10”的错误

    前言 在客户的服务器电脑安装net4.6,提示安装失败错误,最后顺利成功安装net4.6. 一.错误 1.win2012R2安装net4.6.2失败提示“更新2919355包问题,或者win8.1.w ...

  2. 安装wamp,访问主页提示PHP configuration loaded file……

    安装wamp,访问主页提示PHP configuration loaded file…… *** ERROR *** The PHP configuration loaded file is: - s ...

  3. iOS 报错信息: dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from

    新建项目,引入framework,运行时出现警告:dyld: Library not loaded: @rpath/RLLibrary.framework/RLLibrary  Referenced ...

  4. Solve Error: Library not loaded: @rpath/RoutingHTTPServer.framework/RoutingHTTPServer

    在配置WebDriverAgent的时候,可能会遇到如下的错误: 2018-01-04 09:53:42.759370-0600 WebDriverAgentRunner-Runner[318:133 ...

  5. Swift真机调试时报错dyld: Library not loaded: @rpath/libswiftCore.dylib

    dyld: Library not loaded: @rpath/libswiftCore.dylib Referenced from: /private/var/mobile/Containers/ ...

  6. 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 ...

  7. ios dyld: Library not loaded: @rpath/xxx.framework/xxx 之根本原因

    碰到问题 dyld: Library not loaded: @rpath/xxx.framework/xxx Referenced from: /var/containers/Bundle/Appl ...

  8. JDBC链接Mysql失败

    错误信息:Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionExc ...

  9. net start mysql 失败提示“NET HELPMSG 3534”

    lz使用的window系统8.0.16版本的mysql,以下四步解决如上问题: 1. mysqld -remove 2. mysqld --initialize 3.mysqld -install(m ...

随机推荐

  1. code1064 虫食算

    dfs搜索每个字母对应的数字 剪枝: 1.当一列上三个数a b c都已知时,如果 (a+b)%n!=c && (a+b+1)%n!=c 剪枝(+1是考量进位,注意&&) ...

  2. [Training Video - 3] [Groovy in Detail] Non-static and Static functions, initializing log inside class

    log.info "starting" // we use class to create objects of a class Planet p1 = new Planet() ...

  3. [SoapUI] 在Test Step 下加Script Assertion,用 messageExchange 获取当前步骤的response content

    //Get response content of the current request def response = messageExchange.getResponseContent() // ...

  4. 回顾2017系列篇(三):UX设计大会,都预示了哪些设计趋势

    2017已接近尾声,在这一年中,无数的UX大会和设计大会在世界各地召开.每一场会议的召开,都是界内精英人士经验的交流和智慧的碰撞.虽然2017年的会议都已过去,但每场会议上的话题探讨,尤其是界内精英们 ...

  5. c语言条件编译#ifdef与#if defined

    c语言条件编译#ifdef与#if defined   c语言条件编译#ifdef与#if defined 摘自:https://www.cnblogs.com/zhangshenghui/p/566 ...

  6. js实现水平伸缩菜单

    window.onload=function(){ var aA=document.getElementsByTagName('a'); for(var i=0; i<aA.length; i+ ...

  7. springboot+swagger集成

    一.swagger介绍 Swagger 是一款RESTFUL接口的文档在线自动生成+功能测试功能软件.本文简单介绍了在项目中集成swagger的方法和一些常见问题.如果想深入分析项目源码,了解更多内容 ...

  8. 优秀前端工程师必备: (总结) 清除原生ios按钮样式

    写移动端的web开发时, 需要清除IOS本身的各种样式: 1.消除ios按钮原生样式, 给按钮加自定义样式: input[type="button"], input[type=&q ...

  9. 金士顿DT100 G3 PS2251-07海力士U盘量产修复成功教程

    金士顿DT100 G3这款U盘.用了大概一年半没什么问题,前段时间拷贝大文件,无奈电脑突然断电,然后这个U盘在电脑上就读不出来了,只能显示盘符,所以有了修复过程.   最开始我也是菜鸟,不知道怎么搞, ...

  10. Windows Live Writer发布CSDN离线博客教程及测试

    目前大部分的博客作者在用Word写博客这件事情上都会遇到以下3个痛点: 1.所有博客平台关闭了文档发布接口,用户无法使用Word,Windows Live Writer等工具来发布博客.使用Word写 ...