简体   繁体   English

MacOS 上的 Python“dyld:库未加载”- 错误

[英]Python on MacOS "dyld: Library not loaded" - error

I am trying to run a python script that executes few API calls and Kafka logic but getting following error:我正在尝试运行一个执行少量 API 调用和 Kafka 逻辑的 python 脚本,但出现以下错误:
dyld: Library not loaded: @executable_path/../.Python

Tried brew update && brew upgrade and also with both Python2 and Python3 but still getting same error.尝试了brew update && brew upgrade以及 Python2 和 Python3,但仍然遇到相同的错误。
What could be the cause and how to fix it?可能是什么原因以及如何解决?

Hi I got this issue too after brew upgrade, I solved with delete virtualenv嗨,我在 brew 升级后也遇到了这个问题,我用 delete virtualenv 解决了

find myvirtualenv -type l -delete

then recreate virtualenv然后重新创建 virtualenv

virtualenv myvirtualenv

Reference:参考:

http://www.jeremycade.com/python/osx/homebrew/2015/03/02/fixing-virtualenv-after-a-python-upgrade/ http://www.jeremycade.com/python/osx/homebrew/2015/03/02/fixing-virtualenv-after-a-python-upgrade/

The issue is related to hombrew Python installs/upgrade . 该问题与 hombrew Python installs/upgrade 有关

Anyone who is using pipenv (and you should:) can simply use these two commands — without having the venv activated:任何使用pipenv的人(你应该:)都可以简单地使用这两个命令——无需激活 venv:

rm -rf `pipenv --venv` # remove the broken venv
pipenv install --dev   # reinstall the venv from pipfile 

暂无
暂无

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

相关问题 macOS Big Sur 更新后 python3.5 错误“未加载 dyld 库:CoreFoundation” - python3.5 error 'dyld library not loaded: CoreFoundation' after macOS Big Sur update 解决 PyCharm python 错误 - dyld: 库未加载 - Resolving PyCharm python error - dyld: Library not loaded 由于dyld而运行sphinx时出错:库未加载:@ rpath / Python - error running sphinx due to dyld: Library not loaded: @rpath/Python 如何解决dyld:Myo的python包装器中的库未加载错误 - How to solve dyld: Library not loaded error in a python wrapper for a Myo macOS 11.6/Xcode 13 上的诗歌安装失败:dyld:未加载库:@executable_path/../Python3 - poetry install fails on macOS 11.6/Xcode 13: dyld: Library not loaded: @executable_path/../Python3 macOS Big Sur 更新后出现 Jupyter 笔记本错误“dyld 库未加载:CoreFoundation” - Jupyter notebook error 'dyld library not loaded: CoreFoundation' after macOS Big Sur update dyld:库未加载:@executable_path/../.Python - dyld: Library not loaded: @executable_path/../.Python virtualenv中引发的错误-dyld:未加载库:/Library/Frameworks/Python.framework/Versions/3.4/Python - error raised in virtualenv - dyld: Library not loaded: /Library/Frameworks/Python.framework/Versions/3.4/Python AWS SAM CLI 全新安装引发错误 - dyld:未加载库:@executable_path/../.Python - AWS SAM CLI Fresh install throws error - dyld: Library not loaded: @executable_path/../.Python `dyld:Library not loaded`错误阻止virtualenv加载 - `dyld: Library not loaded` error preventing virtualenv from loading
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM