Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

First of all i installed python 2.7 with manual.After i installed python2.6 with macport with referenced this.

And after i deleted my Python 2.7 files.

The main point is when i write python at terminal get this

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

But if i write this command python2.6 the python is worked with all component (like PyQt).

So how can i active python command ?

share|improve this question
    
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
add comment

1 Answer 1

up vote 0 down vote accepted

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

You can include on the first line of every python script this...

# !/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 so...

alias python = '/path/to/pythonversion'

I would go with the first version myself.

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.