简体   繁体   English

导入 pycurl:未加载库:@rpath/libcrypto.1.1.dylib:原因:找不到图像

[英]import pycurl: Library not loaded: @rpath/libcrypto.1.1.dylib : Reason: image not found

My flask app python code error's out with below error :我的flask应用程序python代码错误出现以下错误:

Traceback (most recent call last):
  File "######.py",
    import pycurl
ImportError: dlopen(/Users/########/Library/Python/3.7/lib/python/site-packages/pycurl.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libcrypto.1.1.dylib
  Referenced from: /Users/########/Library/Python/3.7/lib/python/site-packages/pycurl.cpython-37m-darwin.so
  Reason: image not found

OS: Darwin Kernel Version 18.6.0 - Mojave 10.14.5操作系统:达尔文内核版本 18.6.0 - Mojave 10.14.5

Tried updating brew, openssl (link and unlink, export LDFLAGS, export CFFFLAGS) but nothing appears to work尝试更新 brew、openssl(链接和取消链接、导出 LDFLAGS、导出 CFFFLAGS)但似乎没有任何效果

$ brew install openssl 
openssl 1.0.2s is already installed and up-to-date
$brew install curl-openssl
curl-openssl 7.65.3 is already installed and up-to-date

Any additional pointers to try.要尝试的任何其他指针。 Thanks in advance提前致谢

What solved it in my case was changing the path where Python would look for this libs, as they were installed by brew.在我的情况下解决它的是更改 Python 查找此库的路径,因为它们是由 brew 安装的。 But you can tell it to look for the lib somewhere else:但是你可以告诉它在其他地方寻找 lib:

Add the following at the bottom of your profile file (~/.bashrc or ~/.zshrc, depending on your shell) :在您的配置文件(~/.bashrc 或 ~/.zshrc,取决于您的 shell)底部添加以下内容:

export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/local/lib

Then restart your shell, and try again (remember to reload your venv if your were using one).然后重新启动你的 shell,再试一次(如果你正在使用一个,请记住重新加载你的 venv)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 samtools - dyld:库未加载:@rpath/libcrypto.1.0.0.dylib - samtools - dyld: Library not loaded: @rpath/libcrypto.1.0.0.dylib 库未加载:@rpath/libmysqlclient.21.dylib 原因:找不到图像 Django 使用 mysqlclient DB 驱动程序迁移错误和 MySQL 8 with macOS - Library not loaded: @rpath/libmysqlclient.21.dylib Reason: image not found Django migrate error using mysqlclient DB driver and MySQL 8 with macOS 库未加载:@ rpath / libopenblasp-r0.2.19.dylib multiarray.cpython-36m-darwin.so原因:找不到图像 - Library not loaded: @rpath/libopenblasp-r0.2.19.dylib multiarray.cpython-36m-darwin.so Reason: image not found 库未加载:libssl.1.0.0.dylib原因:找不到图像 - library not loaded: libssl.1.0.0.dylib reason: image not found 库未加载:@ rpath / libboost_thread.dylib - Library not loaded: @rpath/libboost_thread.dylib 未加载库:@ rpath / libpng16.16.dylib - Library not loaded: @rpath/libpng16.16.dylib 库 (dylib) 未加载 - 找不到图像 - Python IDE - Library (dylib) not loaded - image not found - Python IDE 使用flask_mysqldb获取“库未加载:libssl.1.0.0.dylib”,“原因:找不到图像” - Getting "Library not loaded: libssl.1.0.0.dylib", "Reason: image not found" with flask_mysqldb 库未加载:/usr/local/opt/mysql/lib/libmysqlclient.21.dylib和原因映像未找到 - Library not loaded: /usr/local/opt/mysql/lib/libmysqlclient.21.dylib and Reason image not found macos 库上的 pymqi 未加载:@rpath/libmqic_r.dylib pymqe - pymqi on macos Library not loaded: @rpath/libmqic_r.dylib pymqe
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM