Matplotlib - python does not find pylab
Nick Guenther
kousue at gmail.com
Tue Mar 3 18:25:00 CET 2009
On Tue, Mar 3, 2009 at 12:18 PM, Pau <vim.unix at googlemail.com> wrote:
> Hello,
>
> I have many python scripts to plot graphs.
>
> I have now done a clean OpenBSD install (-current) on a thinkpad x200s.
>
> hux(p8)| uname -a
> OpenBSD hux 4.5 GENERIC#1748 i386
>
> I have installed py-matplotlib and python.
>
> My scripts start like this:
>
> -------------------------------------
> #!/usr/bin/env python
> """
> some comment
> """
>
> from pylab import *
>
> # Create arrays
> X = load ( './BinaryData_0.dat')
> etc etc
> -------------------------------------
>
> I have done thousands of plots with this scheme.
>
> But now, when I try to execute the script, I get
>
> Traceback (most recent call last):
> File "./KozaiEccSemi.py", line 11, in ?
> from pylab import *
> ImportError: No module named pylab
>
> This is Python 2.5.4, on zsh but I have tried to both change the
> python version and to use a different shell, with default config file
> (my zshrc is complicated)
>
> The error output is always the same.
>
> Any help will be appreciated.
>
Run this python script:
import sys
print sys.path
and then look in the dirs it spits out for anything called "pylab".
It's likely that pylab wasn't installed with py-matplotlib. Did you
read something that suggested it would be?
-Nick
More information about the Openbsd-newbies
mailing list