New answers tagged

0

The issue is that your $PATH environment variable finds Apple's python 2.7 before the python.org one in /usr/local/bin One way is to run the script as /usr/local/bin/python Or run as python3 Another is to alter your path so /usr/local/bin is before /usr/bin . This has bee described in many questions


1

I have done this sort of thing in two ways - however both do not coexist with homebrew although I suspect there should be a way similar to the macports one. The first is using Macports as the package manager. There are separate ports for several python versions 2.x and 3.x currently 2.4, 2.5, 2.6, 2.7 and 3.1, 3.2, 3.3 3.4 and 3.5. For example to install ...


1

Your PATH environment variable seems to have been changed somewhere. Type the following command at your Terminal prompt: echo 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/bin:$PATH' >> ~/.bash_profile Exit terminal and the shell by typing exit and closing the Terminal app. Relaunch. Everything should be working now.



Top 50 recent answers are included