H
H
HeartOfProgrammer2016-07-26 02:17:29
Python
HeartOfProgrammer, 2016-07-26 02:17:29

Why terminal on Mac OS X doesn't see python?

I wanted to disable python2.7 and enable python3.5. But I did it wrong, disabled python2.7 with this command

sudo ln -f /usr/bin/python2.6 /usr/local/bin/python

Now the terminal does not respond to commands such as:
python
which python

I know that some programs on Mac OS X work on python2.7.
I need to return the previous state of python so that it reacts to commands in the terminal because
python
which python

These files in /usr/bin are available, they have not been removed:
python-config
python2.6
python2.6-config
python2.7
python2.7-config
pythonw
pythonw2.6
pythonw2.7

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
silverjoe, 2016-07-26
@HeartOfProgrammer

ln -f removes the symbolic link
ln -s creates the symbolic link
you disabled 2.7 and 3.5 did not re-enable.

V
Vladimir, 2016-07-26
@vintello

in fact, you just deleted a symbolic link to one of /usr/bin/python*
, you need to create it and life will get better

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question