I have installed both python3.3 and python2.6.
I have set python3.3 to default by creating an alias named "python" in usr/bin and another one for python2.6 named "python2.6".
Now if I type in the terminal "python" python3.3 will be open but if I type "python2.6" I get "cannot execute binary file".
I can launch the binary directly but not through the alias.
I have checked the permissions and are the same for both binaries and aliases so I don't know what to do.
Can someone help me?
MacOS – “Cannot execute binary file” with alias of binary
binarymacospython
Related Question
- MacOS – Characters do not echo in OS X terminal unless I hit the delete key
- Macports: switching back to the system default version of Python
- MacOS – Changing Default Apache version on MacOS Sierra
- Force terminal to use binary from a different path
- MacOS – Cannot start MySQL – server quit “w/o updating PID file” (PID file missing)
- Fix virtualenv after installing python 3 with brew
- MacOS – How to execute python script by terminal
- How to get Apache to use the default pyenv Python version instead of the system one
Best Answer
Instead of using Finder aliases, use Terminal to create symbolic links (see
man ln
for details on usage):It's usually not a good idea to mess with
/usr/bin
content (will be wiped out with the next upgrade). Use/usr/local/bin
instead and make sure it comes before/usr/bin
in $PATH.