ForTheEvulz
ForTheEvulz

Reputation: 81

"-bash: python2: command not found" on OS X

I'm trying to use this script to import my iTunes library to another program.

At the step where I enter python2 export_to_quod_libet.py, I'm getting an error message that says that the python2 command can't be found. I figured out through python -v that I definitely have Python 2.7 installed, so I'm really confused about this.

I did find a similar question being asked here, but the original poster was using Windows (whereas I'm using OS X El Capitan), so a lot of what was said at least didn't seem applicable to my situation.

Could someone tell me what I'm doing wrong, please?

Upvotes: 8

Views: 18795

Answers (2)

diyprojects.io
diyprojects.io

Reputation: 41

I confirmed it works on macOS. I installed Python 2.7 and 3.5 using brew commands:

brew update
brew install python
brew install python3

Upvotes: 4

Julian
Julian

Reputation: 1732

Maybe you could try do define an alias. It seems that python2 is hardcoded somewhere in the script.

You could try (just an example):

alias python2="python2.7"

and then run the script -- hope that helps.

Kind regards, Julian

Upvotes: 14

Related Questions