python: bad interpreter: no such file or directory

Viewed 2354

I use pyenv to manage python installations but this morning after I installed graphviz with Homebrew any commands which use python started to break with the error bad interpreter: No such file or directory. For example, when I run docker-compose:

/Users/hammer/Library/Python/3.7/bin/docker-compose: /usr/local/opt/python/bin/python3.7: bad interpreter: No such file or directory

It's true that /usr/local/opt/python/bin/python3.7 doesn't exist, but I don't know where this value is configured? What is pointing at it? Python works fine for me otherwise:

% which python
/Users/.../.pyenv/shims/python
% python --version
Python 3.8.5
% python
Python 3.8.5 (default, Jul 21 2020, 10:48:26) 
[Clang 11.0.3 (clang-1103.0.32.62)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

I'm running MacOS 10.15.5. I've tried reinstalling pyenv and python

0 Answers
Related