tags:

views:

39

answers:

3

So I'm going through the matplotlib documentation and prepared to use the iPython interactive Python shell with ipython -pylab. However I get this:

Az's MBP:~ Az$ ipython -pylab
-bash: ipython: command not found

Did I fail to install iPython? I used easy_install as advised.

Any ideas?

Update

Found it in /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin. Am still confused.

A: 

Did I fail to install iPython?

Yes

OscarRyz
A: 

Maybe your ipython executable isn't in your PATH. Try locate your ipython executable on your machine and check your PATH settings. Otherwise just reinstall.

The MYYN
easy_install should've done that for him anyway. Somehow the installation failed. But, I guess superuser.com would be a better place to ask
OscarRyz
Found it in - dear god - `/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin`
Az
+1  A: 

Did I fail to install iPython?

No, but it looks like you installed it with (darwinports or) macports -- I imagine that's where your installation of easy_install comes from, since Apple's own system Python doesn't include extensions such as easy_install, and /opt/local/... is where macports puts things.

If you're OK with using macports' versions of Python and everything, you should ensure that deeply-nested bin directory is on your $PATH so you can call things from there easily in your Terminal.app.

Alex Martelli
Hi Alex! How would I go about doing that if you don't mind me asking? I did install Python using MacPorts but a friend helped me set it up. Do you reckon he did the same thing to ensure that the `bin` directory was on my `$PATH`? Is that the reason I can just go into Terminal and run python just like that?
Az
@Az, Python comes with OS X -- but third party niceties like `easy_install` are not part of what Apple gives you and many find it easier to use macports' Python for that purpose. All you need is `export PATH=...` in your `~/.bash_profile` -- one of the colon separated item in the path should be that `/opt/local/.../bin` directory (and you probably want the `/opt/local/...` directories early in your PATH if you intend them to take precedence over the system ones such as `/bin`, `/usr/bin`, etc).
Alex Martelli