2

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 myfile.py instead of having to type /pypy myfile.py?

4

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

/path/to/pypy

the restart the terminal. For instance, I installed julia (http://julialang.org/) and I added a julia file in paths.d

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

HTH

2

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.

  • 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .