8

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?

4
  • 2
    Just use python export_to_quod_libet.py. Commented Jul 13, 2016 at 6:21
  • 6
    If you can call python -v just use python export_to_quod_libet.py instead of python2 .... Commented Jul 13, 2016 at 6:21
  • 2
    python2 is just a filename, so it needs to match the name of an available program in your PATH. Fix your script by editing it to use the name available in your system, as the previous comments suggested. Commented Jul 13, 2016 at 6:28
  • 1
    Okay, yeah, this was probably a dumb question. Thanks everyone. Commented Jul 13, 2016 at 6:36

2 Answers 2

14

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

Sign up to request clarification or add additional context in comments.

1 Comment

This was a good suggestion for me, as I prefer to use a pyenv installed version rather than system python
4

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.