Powerline: "bad interpreter" error on Terminal startup

Created on 2 Jan 2017  路  7Comments  路  Source: powerline/powerline

/usr/local/lib/python3.5/site-packages/powerline/bindings/zsh/powerline.zsh:200: /usr/local/bin/powerline-config: bad interpreter: /usr/local/opt/python3/bin/python3.5: no such file or directory
/usr/local/lib/python3.5/site-packages/powerline/bindings/zsh/powerline.zsh:204: /usr/local/bin/powerline-config: bad interpreter: /usr/local/opt/python3/bin/python3.5: no such file or directory'

I get the above message printed at the start of every Terminal session. Using a macOS Sierra (10.12.3 Beta) machine and this issue wasn't present until about a week ago. I'm not sure what was changed that made this issue start... the only things that could have changed my Python installation recently (if that's the issue) are regular Homebrew updates using the brew update command.

I don't quite understand what's wrong here, but any help would be appreciated. :+)

-- paanvaannd

cshell installation macos serror in environment

Most helpful comment

cd /usr/local/opt/python/bin
ln -s python3.7 python3.6
pip3 install powerline_shell

Then everything is OK for me.

All 7 comments

I think that you have updated python to python 3.6, but did not reinstall powerline, previously installed used some python-version-specific way.


In Gentoo I would suggest to use python-updater which reinstalls python packages installed by system package manager after updating Python version (emerge does not handle this automatically, so there are many scripts like python-updater for different languages), but I do not know whether Mac OS has something equivalent. Also in Gentoo you would need to reinstall yourself all packages installed by pip and not system package manager, python-updater will not handle them.

Thanks for the timely response! I'll search for a way to do this in macOS.

@paanvaannd Were you able to figure it out?

@simonsterj I have since somehow fixed it but I have done so many things since then that I don't know what fixed it lol

Probably from either manually uninstalling Python packages or through re-installing once I did a clean install of my OS since then. Sorry I can't be of more assistance :/

cd /usr/local/opt/python/bin
ln -s python3.7 python3.6
pip3 install powerline_shell

Then everything is OK for me.

pip3 install powerline_shell solved it for me.

When I switch python from 3.7 to 3.6, it did not work again

So better solution is:

pip3 uninstall powerline_shell
pip3 install powerline_shell

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ssbanerje picture ssbanerje  路  6Comments

guyzmo picture guyzmo  路  5Comments

ghost picture ghost  路  7Comments

damienstanton picture damienstanton  路  3Comments

sachevl picture sachevl  路  3Comments