Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just installed pypy, and I've made a symlink from /pypy to my pypy installation.

How can I turn this into a command, so that I can just type pypy instead of having to type /pypy

share|improve this question
up vote 4 down vote accepted

if you are on Snow leopard or on Lion the way to do it is as follows:

go to /etc/paths.d then

sudo touch pypy

then edit the pypy file (with vim, nano or whatever) to include the path to pypy


the restart the terminal. For instance, I installed julia ( and I added a julia file in paths.d

$ cd /etc/paths.d
$ ls 
50-X11   MacGPG2  TeX      TeXbin   git      julia
$ cat julia 


share|improve this answer

It depends on your shell. Check your $SHELL and $PATH variables

Symlinks should be executable by default, so you might just link your pypy to a directory already in your path. /usr/local/bin is a good choice for this sort of thing unless you have more intricate needs to separate things.

share|improve this answer
I've currently stored the binary next to the python framework, so I believe it's in /system/lybrary/frameworks, there I've created a directory called pypy, which now stores that. I'll look into the variables now. – bigblind Apr 17 '12 at 12:45
I think I should add my pypy directory to the $PATH variable, looking up how to do that now. – bigblind Apr 17 '12 at 12:47
I've edited my .profile file, so that it contains export PATH=/pypy:$PATH but that doesn't work. – bigblind Apr 17 '12 at 12:55

Your Answer


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.