安装mysqlclient, 链接mysql失败,提示“Library not loaded: @rpath/libmysqlclient.21.dylib”

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff }
span.s1 { }

问题:

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

原文地址:https://www.cnblogs.com/tim-eff/p/9607472.html

时间: 2024-10-28 23:33:50

安装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.win10”的错误. 二.解决方法 1.先在官方下载更新安装包,地址:https://www.microsoft.com/en-us/download/details.aspx?id=42334 2.安装更新包,必须按顺序来安装先安装Windows8.1-KB2919442-x64.msu,再运行cl

安装wamp,访问主页提示PHP configuration loaded file&hellip;&hellip;

安装wamp,访问主页提示PHP configuration loaded file-- *** ERROR *** The PHP configuration loaded file is: - should be: C:/wamp/bin/apache/apache2.4.17/bin/php.ini or c:/wamp/bin/php/php5.6.15/phpforapache.ini 安装的版本为 wampserver3_x86_apache2.4.17_mysql5.7.9_php

Xcode 7 中 CocoaPods 编译报错 dyld: Library not loaded: @rpath/Pods.framework/Pods

问题症状与解决 在 Xcode 7 beta 3 (7A152u) 中创建 Swift 项目,并使用 CocoaPods 做依赖管理,编译时会遇到如下的报错: dyld: Library not loaded: @rpath/Pods.framework/Pods Referenced from: /private/var/mobile/Containers/Bundle/Application/26B91138-7483-40B0-9BE6-D27072472895/AppName.app/A

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

碰到问题 dyld: Library not loaded: @rpath/xxx.framework/xxx Referenced from: /var/containers/Bundle/Application/0F41980D-5091-449D-AE29-5D018E3EB554/DemoOC.app/DemoOC Reason: image not found enable Always Embed Swift Standard Libraries option under Build

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/Containers/Bundle/Application/3A8F980D-F647-4D6D-B95A-88EC600BCA6B/RR.app/RR Reason: image not found 解决办法:工程->targets->Bulid Phases->complie Sources->

dyld: Library not loaded: @rpath/MySDK.framework/MySDK 错误解决

dyld: Library not loaded: @rpath/MySDK.framework/MySDK   Referenced from: /var/mobile/Applications/08B6D2C2-5028-4A64-93F5-1252B0B0BCAB/MyApp.app/MyApp   Reason: no suitable image found.  Did find: /private/var/mobile/Applications/08B6D2C2-5028-4A64-

dyld: Library not loaded: @rpath/XCTest.framework/XCTest

最近用别人的传给的源代码,发现出现dyld: Library not loaded:问题. 控制台出现如此的输出:dyld: Library not loaded: @rpath/XCTest.framework/XCTest......   经过大量的资料查询,发现是Build Phases 里的Compile Sources 里包含有__Tests.m或者__UITests.m文件,   如需解决,只需将包含__Tests.m或者__UITests.m的编译文件删除就OK了.

dyld: Library not loaded: @rpath/libswiftCore.dyli

今天代码写的很烦躁,写完了,编译成功后,居然,尼玛,直接崩了.控制台输出如下错误: /****************************************************************/ tao  14:37:17dyld: Library not loaded: @rpath/libswiftCore.dylib  Referenced from: /Users/codinghacker/Library/Developer/CoreSimulator/Device

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

新建项目,引入framework,运行时出现警告:dyld: Library not loaded: @rpath/RLLibrary.framework/RLLibrary Referenced from: /var/mobile/Applications/AE92B234-A818-445E-9D69-96E232BD50EB/RLProjectDemo.app/RLProjectDemo Reason: image not found 看网上不少人说是将 上图Link Binary Wit