Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:
dyld: Library not loaded: @executable_path/../.Python

Tried brew update && brew upgrade and also with both Python2 and Python3 but still getting same error.
What could be the cause and how to fix it?

like image 545
cikavladimir Avatar asked Mar 06 '18 13:03

cikavladimir


Video Answer


1 Answers

Hi I got this issue too after brew upgrade, I solved with delete virtualenv

find myvirtualenv -type l -delete

then recreate virtualenv

virtualenv myvirtualenv

Reference:

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

like image 59
azul Avatar answered Sep 18 '22 17:09

azul