1

First of all I installed python 2.7 with manual. After I installed Python 2.6 with Macports with referenced this.

And after that I deleted my Python 2.7 files.

The main point is when I type python at terminal get this:

-bash: /Library/Frameworks/Python.framework/Versions/2.7/bin/python: No such file or directory

But if I type the command python2.6 the Python works with all components (like PyQt).

So how can I activate python command?

  • Depending on which version of OS X you are running, you may have deleted the system-installed version of python (which looks likely based on the path). Have you considered downloading the latest combo update and re-installing the base system to see if that remedies your issue? support.apple.com/downloads/#combo – bmike Mar 21 '13 at 18:22
  • I remove my python version as referenced (stackoverflow.com/a/3819829/1149102) this answer. Is it necessary re-installing base system ? – cyildirim Mar 21 '13 at 18:38
1

I think you probably have two options, barring a reinstallation of 2.7, which might be the easiest thing to do.

You can include the following first line in every Python script:

#!/usr/local/bin/python2.6

Change the path to reflect the version and location of the Python you would like to use.

Alternately you could create a bash alias like:

alias python = '/path/to/pythonversion'

I would go with the first version myself.

  • There is no bin directory at /usr/local/ , i guess deleted. But when i write python2.6 example.py execute correctly.I may try second option but can you show me what is my python version path. (I remind that i installed python2.6 with macport.) – cyildirim Mar 21 '13 at 19:13
  • Thanks everyove. Solved - superuser.com/a/225118/209046 – cyildirim Mar 21 '13 at 19:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .