dyld: Library not loaded: @executable_path/../.Python

Submitted 3 years, 7 months ago
Ticket #124
Views 723
Language/Framework Python
Priority Medium
Status Closed

 I had both Python 2.7 and 3.5 installed on my Mac and was able to use them both successfully. Not too long ago, I installed Anaconda and IPython. I have used those for a couple weeks for prototyping and in-console programming.

After I went back to the regular Python for my Django and Flask projects, I discovered an unpleasant thing. Namely, whenever I try to run python or python3 I get the following error:

dyld: Library not loaded: @executable_path/../.Python
  Referenced from: /Users/name/anaconda3/bin/python3
  Reason: image not found
Abort trap: 6

When I run conda I also get the same error.

If I create a new virtual environment with virtualenv django-project, I am able to activate it, and it allows me to run Python 2.7 successfully.

My question is the following: How can I fix python and python3 for the command line while also retaining the working Anaconda and IPython? How can I make sure that the virtual environments are able to carry Python 3?

Submitted on Sep 10, 20
add a comment

1 Answer

Verified

The gist is that when you create a virtualenv, many symlinks are created to the Homebrew installed Python.

brew install findutils

Submitted 3 years, 6 months ago


Latest Blogs