From vim.unix at googlemail.com Tue Mar 3 18:18:27 2009 From: vim.unix at googlemail.com (Pau) Date: Tue, 3 Mar 2009 18:18:27 +0100 Subject: Matplotlib - python does not find pylab Message-ID: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> 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. Pau From kousue at gmail.com Tue Mar 3 18:25:00 2009 From: kousue at gmail.com (Nick Guenther) Date: Tue, 3 Mar 2009 12:25:00 -0500 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> Message-ID: <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> On Tue, Mar 3, 2009 at 12:18 PM, Pau 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 From kousue at gmail.com Tue Mar 3 18:35:24 2009 From: kousue at gmail.com (Nick Guenther) Date: Tue, 3 Mar 2009 12:35:24 -0500 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> Message-ID: <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> Wait, what's this about python2.4 in those paths? You said you're running python 2.5? What happens if you do $ python25 >>> import pylab ? On Tue, Mar 3, 2009 at 12:31 PM, Pau wrote: > Hello, > > thanks, I thought the same and, as a matter of fact: > > hux(p8)| python > Python 2.4.6 (#1, Feb ?9 2009, 15:01:16) > [GCC 3.3.5 (propolice)] on openbsd4 > Type "help", "copyright", "credits" or "license" for more information. >>>> import sys >>>> print sys.path > ['', '/usr/local/lib/python24.zip', '/usr/local/lib/python2.4', > '/usr/local/lib/python2.4/plat-openbsd4', > '/usr/local/lib/python2.4/lib-tk', > '/usr/local/lib/python2.4/lib-dynload', > '/usr/local/lib/python2.4/site-packages'] >>>> > > But where is pylab? pbrowser doesn't find it and > > # cd /usr/ports/ > # find . -name "*pylab*" > > yields nothing... > > Is this related to running -current? I would prefer to stick to a > stable, but this laptop is too modern... > > 2009/3/3 Nick Guenther : >> On Tue, Mar 3, 2009 at 12:18 PM, Pau 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 >> > > > > -- > Let there be peace on earth. And let it begin with misc > From vim.unix at googlemail.com Tue Mar 3 18:43:49 2009 From: vim.unix at googlemail.com (Pau) Date: Tue, 3 Mar 2009 18:43:49 +0100 Subject: Matplotlib - python does not find pylab In-Reply-To: <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> Message-ID: <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> Hello, I said Ihad tried with different versions of python $ python2.5 Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) [GCC 3.3.5 (propolice)] on openbsd4 Type "help", "copyright", "credits" or "license" for more information. >>> import pylab Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in from matplotlib.pylab import * File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", line 129, in from rcsetup import defaultParams, validate_backend, validate_toolbar File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", line 19, in from matplotlib.colors import is_color_like File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", line 54, in import matplotlib.cbook as cbook File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", line 17, in preferredencoding = locale.getpreferredencoding() File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding setlocale(LC_CTYPE, "") File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting This is the output when using ksh with the default config file And also: >>> import sys >>> print sys.path ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', '/usr/local/lib/python2.5/plat-openbsd4', '/usr/local/lib/python2.5/lib-tk', '/usr/local/lib/python2.5/lib-dynload', '/usr/local/lib/python2.5/site-packages', '/usr/local/lib/python2.5/site-packages/Numeric', '/usr/local/lib/python2.5/site-packages/gst-0.10', '/usr/local/lib/python2.5/site-packages/gtk-2.0'] Do you see something? I don't... thanks for the help Pau 2009/3/3 Nick Guenther : > Wait, what's this about python2.4 in those paths? You said you're > running python 2.5? What happens if you do > $ python25 >>>> import pylab > ? > > On Tue, Mar 3, 2009 at 12:31 PM, Pau wrote: >> Hello, >> >> thanks, I thought the same and, as a matter of fact: >> >> hux(p8)| python >> Python 2.4.6 (#1, Feb ?9 2009, 15:01:16) >> [GCC 3.3.5 (propolice)] on openbsd4 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> import sys >>>>> print sys.path >> ['', '/usr/local/lib/python24.zip', '/usr/local/lib/python2.4', >> '/usr/local/lib/python2.4/plat-openbsd4', >> '/usr/local/lib/python2.4/lib-tk', >> '/usr/local/lib/python2.4/lib-dynload', >> '/usr/local/lib/python2.4/site-packages'] >>>>> >> >> But where is pylab? pbrowser doesn't find it and >> >> # cd /usr/ports/ >> # find . -name "*pylab*" >> >> yields nothing... >> >> Is this related to running -current? I would prefer to stick to a >> stable, but this laptop is too modern... >> >> 2009/3/3 Nick Guenther : >>> On Tue, Mar 3, 2009 at 12:18 PM, Pau 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 >>> >> >> >> >> -- >> Let there be peace on earth. And let it begin with misc >> > -- Let there be peace on earth. And let it begin with misc From vim.unix at googlemail.com Tue Mar 3 18:32:19 2009 From: vim.unix at googlemail.com (Pau) Date: Tue, 3 Mar 2009 18:32:19 +0100 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> Message-ID: <30c383e70903030932ma61d2a6g22a59182f0add32a@mail.gmail.com> -- sorry, Nick, I replied only to you -- > Hello, > > thanks, I thought the same and, as a matter of fact: > > hux(p8)| python > Python 2.4.6 (#1, Feb ?9 2009, 15:01:16) > [GCC 3.3.5 (propolice)] on openbsd4 > Type "help", "copyright", "credits" or "license" for more information. >>>> import sys >>>> print sys.path > ['', '/usr/local/lib/python24.zip', '/usr/local/lib/python2.4', > '/usr/local/lib/python2.4/plat-openbsd4', > '/usr/local/lib/python2.4/lib-tk', > '/usr/local/lib/python2.4/lib-dynload', > '/usr/local/lib/python2.4/site-packages'] >>>> > > But where is pylab? pbrowser doesn't find it and > > # cd /usr/ports/ > # find . -name "*pylab*" > > yields nothing... > > Is this related to running -current? I would prefer to stick to a > stable, but this laptop is too modern... > > 2009/3/3 Nick Guenther : >> On Tue, Mar 3, 2009 at 12:18 PM, Pau 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 >> > > > > -- > Let there be peace on earth. And let it begin with misc > -- Let there be peace on earth. And let it begin with misc From kousue at gmail.com Tue Mar 3 19:17:02 2009 From: kousue at gmail.com (Nick Guenther) Date: Tue, 3 Mar 2009 13:17:02 -0500 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> Message-ID: <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> On Tue, Mar 3, 2009 at 12:43 PM, Pau wrote: > Hello, > > I said Ihad tried with different versions of python > > $ python2.5 > Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) > [GCC 3.3.5 (propolice)] on openbsd4 > Type "help", "copyright", "credits" or "license" for more information. >>>> import pylab > Traceback (most recent call last): > ?File "", line 1, in > ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in > ? ?from matplotlib.pylab import * > ?File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", > line 129, in > ? ?from rcsetup import defaultParams, validate_backend, validate_toolbar > ?File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", > line 19, in > ? ?from matplotlib.colors import is_color_like > ?File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", > line 54, in > ? ?import matplotlib.cbook as cbook > ?File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", > line 17, in > ? ?preferredencoding = locale.getpreferredencoding() > ?File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding > ? ?setlocale(LC_CTYPE, "") > ?File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale > ? ?return _setlocale(category, locale) > locale.Error: unsupported locale setting > > This is the output when using ksh with the default config file That's not an ImportError. That's a locale.Error. You can see in the backtrace from matplotlib.pylab import *, and since it doesn't break there then presumably you have pylab installed. It says the problem: "unsupported locale setting". I'm no expert on locales, though. It is possible that this is a -CURRENT problem. The packages get rebuilt automatically and not tested. You should report this to the maintainer of py-matplotlib who is listed here: $ make search key=py-matplotlib Port: py-matplotlib-0.83.2p5 Path: graphics/py-matplotlib Info: Python charting and plotting API Maint: Damien Miller Index: graphics devel L-deps: iconv.>=4::converters/libiconv intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext python-2.4*:lang/python/2.4 R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 Archs: any > And also: > >>>> import sys >>>> print sys.path > ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', > '/usr/local/lib/python2.5/plat-openbsd4', > '/usr/local/lib/python2.5/lib-tk', > '/usr/local/lib/python2.5/lib-dynload', > '/usr/local/lib/python2.5/site-packages', > '/usr/local/lib/python2.5/site-packages/Numeric', > '/usr/local/lib/python2.5/site-packages/gst-0.10', > '/usr/local/lib/python2.5/site-packages/gtk-2.0'] > > Do you see something? I don't... This list of directories is like your shell $PATH. It doesn't matter what the dirs themselves are, it matters what the contents of those dirs are. But, above you've shown that indeed python2.5 can access pylab so you needn't worry about digging around here. > thanks for the help Welcome :) -Nick From kousue at gmail.com Tue Mar 3 19:48:01 2009 From: kousue at gmail.com (Nick Guenther) Date: Tue, 3 Mar 2009 13:48:01 -0500 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> Message-ID: <98f5a8830903031048m1b4836a9j497a64513548e5cc@mail.gmail.com> That makes sense. That's because `python` is python2.4 for you, as shown in the first test you ran for me. When you pkg_add python it tells you """ If you want to use this package as your default system python, as root create symbolic links like so (overwriting any previous default): ln -sf /usr/local/bin/python2.5 /usr/local/bin/python ln -sf /usr/local/bin/pydoc2.5 /usr/local/bin/pydoc """ May I suggest that you run those commands? On Tue, Mar 3, 2009 at 1:45 PM, Pau wrote: > PS: Using > > #!/usr/bin/env python > > leads to the same problem, even using export LANG=C (this is Python 2.4.6) > > Using > > #!/usr/bin/env python2.5 > > solves it > > 2009/3/3 Pau : >> thanks, Nick >> >> I have fixed the problem. >> >> I was also thinking that it could be due to this locale thing but, >> since I started ksh with the default kshrc, I assumed that it'd be >> export LANG=C per default, but it isn't?? I should not assume >> anything... >> >> Look at this: >> >> hux(p2)| ksh >> $ export LANG=C >> $ date ? -----------------------------------> This is to check that >> the LANG is C >> Tue Mar ?3 19:36:02 CET 2009 --> it is >> $ ./Pfewbody.py >> >> Guess ... it's working now >> >> When I export LANG=C in zsh, it's working too >> >> I am a bit puzzled. I could swear I had tried this too... >> >> Anyway... >> >> Thanks again. >> >> Pau >> >> 2009/3/3 Nick Guenther : >>> On Tue, Mar 3, 2009 at 12:43 PM, Pau wrote: >>>> Hello, >>>> >>>> I said Ihad tried with different versions of python >>>> >>>> $ python2.5 >>>> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >>>> [GCC 3.3.5 (propolice)] on openbsd4 >>>> Type "help", "copyright", "credits" or "license" for more information. >>>>>>> import pylab >>>> Traceback (most recent call last): >>>> ?File "", line 1, in >>>> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in >>>> ? ?from matplotlib.pylab import * >>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >>>> line 129, in >>>> ? ?from rcsetup import defaultParams, validate_backend, validate_toolbar >>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >>>> line 19, in >>>> ? ?from matplotlib.colors import is_color_like >>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >>>> line 54, in >>>> ? ?import matplotlib.cbook as cbook >>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >>>> line 17, in >>>> ? ?preferredencoding = locale.getpreferredencoding() >>>> ?File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding >>>> ? ?setlocale(LC_CTYPE, "") >>>> ?File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale >>>> ? ?return _setlocale(category, locale) >>>> locale.Error: unsupported locale setting >>>> >>>> This is the output when using ksh with the default config file >>> >>> That's not an ImportError. That's a locale.Error. You can see in the >>> backtrace from matplotlib.pylab import *, and since it doesn't break >>> there then presumably you have pylab installed. It says the problem: >>> "unsupported locale setting". I'm no expert on locales, though. >>> >>> It is possible that this is a -CURRENT problem. The packages get >>> rebuilt automatically and not tested. You should report this to the >>> maintainer of py-matplotlib who is listed here: >>> >>> $ make search key=py-matplotlib >>> Port: ? py-matplotlib-0.83.2p5 >>> Path: ? graphics/py-matplotlib >>> Info: ? Python charting and plotting API >>> Maint: ?Damien Miller >>> Index: ?graphics devel >>> L-deps: iconv.>=4::converters/libiconv >>> intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png >>> B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>> gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext >>> python-2.4*:lang/python/2.4 >>> R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>> gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 >>> Archs: ?any >>> >>> >>> >>>> And also: >>>> >>>>>>> import sys >>>>>>> print sys.path >>>> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >>>> '/usr/local/lib/python2.5/plat-openbsd4', >>>> '/usr/local/lib/python2.5/lib-tk', >>>> '/usr/local/lib/python2.5/lib-dynload', >>>> '/usr/local/lib/python2.5/site-packages', >>>> '/usr/local/lib/python2.5/site-packages/Numeric', >>>> '/usr/local/lib/python2.5/site-packages/gst-0.10', >>>> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >>>> >>>> Do you see something? I don't... >>> >>> This list of directories is like your shell $PATH. It doesn't matter >>> what the dirs themselves are, it matters what the contents of those >>> dirs are. But, above you've shown that indeed python2.5 can access >>> pylab so you needn't worry about digging around here. >>> >>>> thanks for the help >>> >>> Welcome :) >>> >>> -Nick >>> >> >> >> >> -- >> Let there be peace on earth. And let it begin with misc >> > > > > -- > Let there be peace on earth. And let it begin with misc > From vim.unix at googlemail.com Tue Mar 3 19:45:26 2009 From: vim.unix at googlemail.com (Pau) Date: Tue, 3 Mar 2009 19:45:26 +0100 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> Message-ID: <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> PS: Using #!/usr/bin/env python leads to the same problem, even using export LANG=C (this is Python 2.4.6) Using #!/usr/bin/env python2.5 solves it 2009/3/3 Pau : > thanks, Nick > > I have fixed the problem. > > I was also thinking that it could be due to this locale thing but, > since I started ksh with the default kshrc, I assumed that it'd be > export LANG=C per default, but it isn't?? I should not assume > anything... > > Look at this: > > hux(p2)| ksh > $ export LANG=C > $ date ? -----------------------------------> This is to check that > the LANG is C > Tue Mar ?3 19:36:02 CET 2009 --> it is > $ ./Pfewbody.py > > Guess ... it's working now > > When I export LANG=C in zsh, it's working too > > I am a bit puzzled. I could swear I had tried this too... > > Anyway... > > Thanks again. > > Pau > > 2009/3/3 Nick Guenther : >> On Tue, Mar 3, 2009 at 12:43 PM, Pau wrote: >>> Hello, >>> >>> I said Ihad tried with different versions of python >>> >>> $ python2.5 >>> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >>> [GCC 3.3.5 (propolice)] on openbsd4 >>> Type "help", "copyright", "credits" or "license" for more information. >>>>>> import pylab >>> Traceback (most recent call last): >>> ?File "", line 1, in >>> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in >>> ? ?from matplotlib.pylab import * >>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >>> line 129, in >>> ? ?from rcsetup import defaultParams, validate_backend, validate_toolbar >>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >>> line 19, in >>> ? ?from matplotlib.colors import is_color_like >>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >>> line 54, in >>> ? ?import matplotlib.cbook as cbook >>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >>> line 17, in >>> ? ?preferredencoding = locale.getpreferredencoding() >>> ?File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding >>> ? ?setlocale(LC_CTYPE, "") >>> ?File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale >>> ? ?return _setlocale(category, locale) >>> locale.Error: unsupported locale setting >>> >>> This is the output when using ksh with the default config file >> >> That's not an ImportError. That's a locale.Error. You can see in the >> backtrace from matplotlib.pylab import *, and since it doesn't break >> there then presumably you have pylab installed. It says the problem: >> "unsupported locale setting". I'm no expert on locales, though. >> >> It is possible that this is a -CURRENT problem. The packages get >> rebuilt automatically and not tested. You should report this to the >> maintainer of py-matplotlib who is listed here: >> >> $ make search key=py-matplotlib >> Port: ? py-matplotlib-0.83.2p5 >> Path: ? graphics/py-matplotlib >> Info: ? Python charting and plotting API >> Maint: ?Damien Miller >> Index: ?graphics devel >> L-deps: iconv.>=4::converters/libiconv >> intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png >> B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >> gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext >> python-2.4*:lang/python/2.4 >> R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >> gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 >> Archs: ?any >> >> >> >>> And also: >>> >>>>>> import sys >>>>>> print sys.path >>> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >>> '/usr/local/lib/python2.5/plat-openbsd4', >>> '/usr/local/lib/python2.5/lib-tk', >>> '/usr/local/lib/python2.5/lib-dynload', >>> '/usr/local/lib/python2.5/site-packages', >>> '/usr/local/lib/python2.5/site-packages/Numeric', >>> '/usr/local/lib/python2.5/site-packages/gst-0.10', >>> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >>> >>> Do you see something? I don't... >> >> This list of directories is like your shell $PATH. It doesn't matter >> what the dirs themselves are, it matters what the contents of those >> dirs are. But, above you've shown that indeed python2.5 can access >> pylab so you needn't worry about digging around here. >> >>> thanks for the help >> >> Welcome :) >> >> -Nick >> > > > > -- > Let there be peace on earth. And let it begin with misc > -- Let there be peace on earth. And let it begin with misc From vim.unix at googlemail.com Tue Mar 3 19:40:28 2009 From: vim.unix at googlemail.com (Pau) Date: Tue, 3 Mar 2009 19:40:28 +0100 Subject: Matplotlib - python does not find pylab In-Reply-To: <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> Message-ID: <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> thanks, Nick I have fixed the problem. I was also thinking that it could be due to this locale thing but, since I started ksh with the default kshrc, I assumed that it'd be export LANG=C per default, but it isn't?? I should not assume anything... Look at this: hux(p2)| ksh $ export LANG=C $ date -----------------------------------> This is to check that the LANG is C Tue Mar 3 19:36:02 CET 2009 --> it is $ ./Pfewbody.py Guess ... it's working now When I export LANG=C in zsh, it's working too I am a bit puzzled. I could swear I had tried this too... Anyway... Thanks again. Pau 2009/3/3 Nick Guenther : > On Tue, Mar 3, 2009 at 12:43 PM, Pau wrote: >> Hello, >> >> I said Ihad tried with different versions of python >> >> $ python2.5 >> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >> [GCC 3.3.5 (propolice)] on openbsd4 >> Type "help", "copyright", "credits" or "license" for more information. >>>>> import pylab >> Traceback (most recent call last): >> ?File "", line 1, in >> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in >> ? ?from matplotlib.pylab import * >> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >> line 129, in >> ? ?from rcsetup import defaultParams, validate_backend, validate_toolbar >> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >> line 19, in >> ? ?from matplotlib.colors import is_color_like >> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >> line 54, in >> ? ?import matplotlib.cbook as cbook >> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >> line 17, in >> ? ?preferredencoding = locale.getpreferredencoding() >> ?File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding >> ? ?setlocale(LC_CTYPE, "") >> ?File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale >> ? ?return _setlocale(category, locale) >> locale.Error: unsupported locale setting >> >> This is the output when using ksh with the default config file > > That's not an ImportError. That's a locale.Error. You can see in the > backtrace from matplotlib.pylab import *, and since it doesn't break > there then presumably you have pylab installed. It says the problem: > "unsupported locale setting". I'm no expert on locales, though. > > It is possible that this is a -CURRENT problem. The packages get > rebuilt automatically and not tested. You should report this to the > maintainer of py-matplotlib who is listed here: > > $ make search key=py-matplotlib > Port: ? py-matplotlib-0.83.2p5 > Path: ? graphics/py-matplotlib > Info: ? Python charting and plotting API > Maint: ?Damien Miller > Index: ?graphics devel > L-deps: iconv.>=4::converters/libiconv > intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png > B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 > gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext > python-2.4*:lang/python/2.4 > R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 > gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 > Archs: ?any > > > >> And also: >> >>>>> import sys >>>>> print sys.path >> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >> '/usr/local/lib/python2.5/plat-openbsd4', >> '/usr/local/lib/python2.5/lib-tk', >> '/usr/local/lib/python2.5/lib-dynload', >> '/usr/local/lib/python2.5/site-packages', >> '/usr/local/lib/python2.5/site-packages/Numeric', >> '/usr/local/lib/python2.5/site-packages/gst-0.10', >> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >> >> Do you see something? I don't... > > This list of directories is like your shell $PATH. It doesn't matter > what the dirs themselves are, it matters what the contents of those > dirs are. But, above you've shown that indeed python2.5 can access > pylab so you needn't worry about digging around here. > >> thanks for the help > > Welcome :) > > -Nick > -- Let there be peace on earth. And let it begin with misc From vim.unix at googlemail.com Tue Mar 3 20:50:46 2009 From: vim.unix at googlemail.com (Pau) Date: Tue, 3 Mar 2009 20:50:46 +0100 Subject: Matplotlib - python does not find pylab In-Reply-To: <98f5a8830903031048m1b4836a9j497a64513548e5cc@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> <98f5a8830903031048m1b4836a9j497a64513548e5cc@mail.gmail.com> Message-ID: <30c383e70903031150h7149a0eal9354e847263e2a6a@mail.gmail.com> > That makes sense. That's because `python` is python2.4 for you, as > shown in the first test you ran for me. When you pkg_add python it > tells you yes, I know, but I was puzzled because I could swear I had tried python2.5 and I had had the same problem... > May I suggest that you run those commands? absolutely... but I had already done it Again charmed by the politeness and helpfulness of this mailing list, yours, Pau > > On Tue, Mar 3, 2009 at 1:45 PM, Pau wrote: >> PS: Using >> >> #!/usr/bin/env python >> >> leads to the same problem, even using export LANG=C (this is Python 2.4.6) >> >> Using >> >> #!/usr/bin/env python2.5 >> >> solves it >> >> 2009/3/3 Pau : >>> thanks, Nick >>> >>> I have fixed the problem. >>> >>> I was also thinking that it could be due to this locale thing but, >>> since I started ksh with the default kshrc, I assumed that it'd be >>> export LANG=C per default, but it isn't?? I should not assume >>> anything... >>> >>> Look at this: >>> >>> hux(p2)| ksh >>> $ export LANG=C >>> $ date ? -----------------------------------> This is to check that >>> the LANG is C >>> Tue Mar ?3 19:36:02 CET 2009 --> it is >>> $ ./Pfewbody.py >>> >>> Guess ... it's working now >>> >>> When I export LANG=C in zsh, it's working too >>> >>> I am a bit puzzled. I could swear I had tried this too... >>> >>> Anyway... >>> >>> Thanks again. >>> >>> Pau >>> >>> 2009/3/3 Nick Guenther : >>>> On Tue, Mar 3, 2009 at 12:43 PM, Pau wrote: >>>>> Hello, >>>>> >>>>> I said Ihad tried with different versions of python >>>>> >>>>> $ python2.5 >>>>> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >>>>> [GCC 3.3.5 (propolice)] on openbsd4 >>>>> Type "help", "copyright", "credits" or "license" for more information. >>>>>>>> import pylab >>>>> Traceback (most recent call last): >>>>> ?File "", line 1, in >>>>> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in >>>>> ? ?from matplotlib.pylab import * >>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >>>>> line 129, in >>>>> ? ?from rcsetup import defaultParams, validate_backend, validate_toolbar >>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >>>>> line 19, in >>>>> ? ?from matplotlib.colors import is_color_like >>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >>>>> line 54, in >>>>> ? ?import matplotlib.cbook as cbook >>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >>>>> line 17, in >>>>> ? ?preferredencoding = locale.getpreferredencoding() >>>>> ?File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding >>>>> ? ?setlocale(LC_CTYPE, "") >>>>> ?File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale >>>>> ? ?return _setlocale(category, locale) >>>>> locale.Error: unsupported locale setting >>>>> >>>>> This is the output when using ksh with the default config file >>>> >>>> That's not an ImportError. That's a locale.Error. You can see in the >>>> backtrace from matplotlib.pylab import *, and since it doesn't break >>>> there then presumably you have pylab installed. It says the problem: >>>> "unsupported locale setting". I'm no expert on locales, though. >>>> >>>> It is possible that this is a -CURRENT problem. The packages get >>>> rebuilt automatically and not tested. You should report this to the >>>> maintainer of py-matplotlib who is listed here: >>>> >>>> $ make search key=py-matplotlib >>>> Port: ? py-matplotlib-0.83.2p5 >>>> Path: ? graphics/py-matplotlib >>>> Info: ? Python charting and plotting API >>>> Maint: ?Damien Miller >>>> Index: ?graphics devel >>>> L-deps: iconv.>=4::converters/libiconv >>>> intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png >>>> B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>> gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext >>>> python-2.4*:lang/python/2.4 >>>> R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>> gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 >>>> Archs: ?any >>>> >>>> >>>> >>>>> And also: >>>>> >>>>>>>> import sys >>>>>>>> print sys.path >>>>> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >>>>> '/usr/local/lib/python2.5/plat-openbsd4', >>>>> '/usr/local/lib/python2.5/lib-tk', >>>>> '/usr/local/lib/python2.5/lib-dynload', >>>>> '/usr/local/lib/python2.5/site-packages', >>>>> '/usr/local/lib/python2.5/site-packages/Numeric', >>>>> '/usr/local/lib/python2.5/site-packages/gst-0.10', >>>>> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >>>>> >>>>> Do you see something? I don't... >>>> >>>> This list of directories is like your shell $PATH. It doesn't matter >>>> what the dirs themselves are, it matters what the contents of those >>>> dirs are. But, above you've shown that indeed python2.5 can access >>>> pylab so you needn't worry about digging around here. >>>> >>>>> thanks for the help >>>> >>>> Welcome :) >>>> >>>> -Nick >>>> >>> >>> >>> >>> -- >>> Let there be peace on earth. And let it begin with misc >>> >> >> >> >> -- >> Let there be peace on earth. And let it begin with misc >> > -- Let there be peace on earth. And let it begin with misc From alan.dewitt at gmail.com Tue Mar 10 22:40:57 2009 From: alan.dewitt at gmail.com (Alan DeWitt) Date: Tue, 10 Mar 2009 14:40:57 -0700 Subject: Virtualizing existing OpenBSD onto qemu with dd Message-ID: <70b8249a0903101440p1009d258pe6d0ab4f42b6403e@mail.gmail.com> I'm not sure this is strictly speaking a newbies question, but here we go. I've got an old OpenBSD server that I wish to virtualize. (It'd probably be easier to just rebuild it from scratch in a VM, but what's the fun in that?) I nfs-mounted some space to my source system and - after puzzling a bit over which disk slice to dd - I copied as such: dd if=/dev/wd0c of=/mnt/heron/hedgehog bs=512x1008 count=16383 I then fired up qemu using the disk image file on the VM host and the darn thing actually booted to OpenBSD. Woo-hoo! However, the VM does not mount the disks after / properly. Which I guess is not much of a surprise, as the image file produced by dd is considerably smaller than I would have expected, at 8455200768 bytes when my source machine has about 15G used. The VM fails to mount other slices with automatic fsck failing due to bad superblocks and magic numbers. I'm presuming at this point that I have an incomplete disk copy. Was wd0c not the correct thing to copy with dd? Did I do something incorrectly in my dd command? Is there perhaps an 8GB filesize limit somewhere I'm not aware of? (nfs host is Ubuntu 8.04.) Any ideas or tips to point me in a useful direction? Thanks! -Alan >From physical source machine: # disklabel wd0 # Inside MBR partition 3: type A6 start 63 size 16514001 # /dev/rwd0c: type: ESDI disk: ESDI/IDE disk label: IC35L060AVV207-0 flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 16 sectors/cylinder: 1008 cylinders: 16383 total sectors: 78165360 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # microseconds track-to-track seek: 0 # microseconds drivedata: 0 16 partitions: # size offset fstype [fsize bsize cpg] a: 409185 63 4.2BSD 2048 16384 328 # Cyl 0*- 405 b: 1024128 409248 swap # Cyl 406 - 1421 c: 78165360 0 unused 0 0 # Cyl 0 - 77544 d: 409248 1433376 4.2BSD 2048 16384 328 # Cyl 1422 - 1827 e: 409248 1842624 4.2BSD 2048 16384 328 # Cyl 1828 - 2233 f: 16777152 2251872 4.2BSD 2048 16384 328 # Cyl 2234 - 18877 g: 33554304 27417600 4.2BSD 2048 16384 328 # Cyl 27200 - 60487 h: 8388576 19029024 4.2BSD 2048 16384 328 # Cyl 18878 - 27199 # mount /dev/wd0a on / type ffs (local) /dev/wd0h on /home type ffs (local, nodev, nosuid) /dev/wd0d on /tmp type ffs (local, nodev, nosuid) /dev/wd0f on /usr type ffs (local, nodev) /dev/wd0e on /var type ffs (local, nodev, nosuid) /dev/wd0g on /var/www type ffs (local, nodev, nosuid) # df -h Filesystem Size Used Avail Capacity Mounted on /dev/wd0a 195M 37.4M 148M 20% / /dev/wd0h 3.9G 10.7M 3.7G 0% /home /dev/wd0d 195M 18.0K 185M 0% /tmp /dev/wd0f 7.9G 1.7G 5.7G 23% /usr /dev/wd0e 195M 7.1M 178M 4% /var /dev/wd0g 15.7G 13.1G 1.9G 88% /var/www # df Filesystem 512-blocks Used Avail Capacity Mounted on /dev/wd0a 398716 76660 302124 20% / /dev/wd0h 8252924 21884 7818396 0% /home /dev/wd0d 398780 36 378808 0% /tmp /dev/wd0f 16511100 3646988 12038560 23% /usr /dev/wd0e 398780 14596 364248 4% /var /dev/wd0g 33022236 27470580 3900548 88% /var/www -- You've been signed up to the NSA friends and family plan! From alan.dewitt at gmail.com Wed Mar 11 01:37:16 2009 From: alan.dewitt at gmail.com (Alan DeWitt) Date: Tue, 10 Mar 2009 17:37:16 -0700 Subject: Virtualizing existing OpenBSD onto qemu with dd In-Reply-To: <98f5a8830903101709h261c9b7ajd07b18a7658efa43@mail.gmail.com> References: <70b8249a0903101440p1009d258pe6d0ab4f42b6403e@mail.gmail.com> <98f5a8830903101709h261c9b7ajd07b18a7658efa43@mail.gmail.com> Message-ID: 'cuz..... I'm a doofus? Thanks for the extra eyes, I bet ya that's it. -Alan --- Multipass! On Mar 10, 2009, at 17:09, Nick Guenther wrote: > On Tue, Mar 10, 2009 at 5:40 PM, Alan DeWitt > wrote: >> I'm not sure this is strictly speaking a newbies question, but here >> we >> go. I've got an old OpenBSD server that I wish to virtualize. (It'd >> probably be easier to just rebuild it from scratch in a VM, but >> what's >> the fun in that?) >> >> I nfs-mounted some space to my source system and - after puzzling a >> bit over which disk slice to dd - I copied as such: >> >> dd if=/dev/wd0c of=/mnt/heron/hedgehog bs=512x1008 count=16383 >> >> I then fired up qemu using the disk image file on the VM host and the >> darn thing actually booted to OpenBSD. Woo-hoo! >> >> However, the VM does not mount the disks after / properly. Which I >> guess is not much of a surprise, as the image file produced by dd is >> considerably smaller than I would have expected, at 8455200768 bytes >> when my source machine has about 15G used. The VM fails to mount >> other >> slices with automatic fsck failing due to bad superblocks and magic >> numbers. >> >> I'm presuming at this point that I have an incomplete disk copy. >> >> Was wd0c not the correct thing to copy with dd? Did I do something >> incorrectly in my dd command? Is there perhaps an 8GB filesize limit >> somewhere I'm not aware of? (nfs host is Ubuntu 8.04.) Any ideas or >> tips to point me in a useful direction? > > Why did you do "bs=512x1008 count=16383"? By my calculations, that is > precisely 7.87 1024-based gigabytes. wd0c is the entire drive, > including the bootloader, so that is the correct one to rip, but you > want the *entire* drive, so leave off the count= param. From brakeb at gmail.com Wed Mar 11 03:37:05 2009 From: brakeb at gmail.com (Bryan) Date: Wed, 11 Mar 2009 02:37:05 +0000 Subject: OT: setting variables Message-ID: <6532b7c80903101937o13caacf5g374fc37d080ecf3d@mail.gmail.com> okay, here goes... I am making a script that will help me automate conversion of movies to other formats. I'm trying to set a variable $CROP and I'm trying to pull info from a text file created by mplayer to get the black lines off of the movie. Here is the script: ---------------------------------------------------------------------------------------------- #!/bin/sh mplayer -v -ss 00:15:00 -frames 20 -vf cropdetect dvd://1 > crop.txt export CROP=`tail -n 11 crop.txt | grep CROP | cut -d= -f2 | cut -c 1-11` echo $CROP ---------------------------------------------------------------------------------------------- now, the text file creates text, and I've used the "tail - grep - cut - cut" command on the command line and was able to get the data I needed. Also on the command line, I can export the variable (I do it all the time with PKG_PATH). When I run the script, the crop.txt is created, and the variable prints out $CROP, but after the script ends, I attempt to "echo $CROP" and the variable is empty... Is there something I'm missing? Or is there nothing wrong, and the script (while running) knows the value of $CROP, value of $CROP is dropped once the script terminates. Regards, Bryan From mike at erdelynet.com Wed Mar 11 03:58:15 2009 From: mike at erdelynet.com (Mike Erdely) Date: Tue, 10 Mar 2009 22:58:15 -0400 Subject: OT: setting variables In-Reply-To: <6532b7c80903101937o13caacf5g374fc37d080ecf3d@mail.gmail.com> References: <6532b7c80903101937o13caacf5g374fc37d080ecf3d@mail.gmail.com> Message-ID: <20090311025815.GF12808@erdelynet.com> On Wed, Mar 11, 2009 at 02:37:05AM +0000, Bryan wrote: > now, the text file creates text, and I've used the "tail - grep - cut > - cut" command on the command line and was able to get the data I > needed. Also on the command line, I can export the variable (I do it > all the time with PKG_PATH). When I run the script, the crop.txt is > created, and the variable prints out $CROP, but after the script ends, > I attempt to "echo $CROP" and the variable is empty... > > Is there something I'm missing? Or is there nothing wrong, and the > script (while running) knows the value of $CROP, value of $CROP is > dropped once the script terminates. When the script is run, a new sub-shell is created and the variable is set within that sub-shell. When the script exits, so does the variable. If you want the variable to be set in the current shell's environment, you could run: . ./script This will execute the commands inside the current shell. -ME From kousue at gmail.com Wed Mar 11 04:11:23 2009 From: kousue at gmail.com (Nick Guenther) Date: Tue, 10 Mar 2009 23:11:23 -0400 Subject: OT: setting variables In-Reply-To: <6532b7c80903101937o13caacf5g374fc37d080ecf3d@mail.gmail.com> References: <6532b7c80903101937o13caacf5g374fc37d080ecf3d@mail.gmail.com> Message-ID: <98f5a8830903102011p232b3483s84347d8ea1d6e604@mail.gmail.com> On Tue, Mar 10, 2009 at 10:37 PM, Bryan wrote: > okay, here goes... > > I am making a script that will help me automate conversion of movies > to other formats. ?I'm trying to set a variable $CROP and I'm trying > to pull info from a text file created by mplayer to get the black > lines off of the movie. ?Here is the script: > > > ---------------------------------------------------------------------------------------------- > #!/bin/sh > > mplayer -v -ss 00:15:00 -frames 20 -vf cropdetect dvd://1 > crop.txt > > export CROP=`tail -n 11 crop.txt | grep CROP | cut -d= -f2 | cut -c 1-11` > > echo $CROP > ---------------------------------------------------------------------------------------------- > > now, the text file creates text, and I've used the "tail - grep - cut > - cut" command on the command line and was able to get the data I > needed. ?Also on the command line, I can export the variable (I do it > all the time with PKG_PATH). ?When I run the script, the crop.txt is > created, and the variable prints out $CROP, but after the script ends, > I attempt to "echo $CROP" and the variable is empty... > > Is there something I'm missing? ?Or is there nothing wrong, and the > script (while running) knows the value of $CROP, value of $CROP is > dropped once the script terminates. > This confused me for SO LONG. The trick is to "source" the file instead of running it as so: . ./script or source ./script You'd think "EXPORT" exports the value to the entire OS, but no, it only exports it beyond the that command line. It sort of makes sense in the context that can do this to pass variables to programs: $ VAR=VAL ./script Unix is crazy. -Nick From kousue at gmail.com Wed Mar 11 01:09:07 2009 From: kousue at gmail.com (Nick Guenther) Date: Tue, 10 Mar 2009 20:09:07 -0400 Subject: Virtualizing existing OpenBSD onto qemu with dd In-Reply-To: <70b8249a0903101440p1009d258pe6d0ab4f42b6403e@mail.gmail.com> References: <70b8249a0903101440p1009d258pe6d0ab4f42b6403e@mail.gmail.com> Message-ID: <98f5a8830903101709h261c9b7ajd07b18a7658efa43@mail.gmail.com> On Tue, Mar 10, 2009 at 5:40 PM, Alan DeWitt wrote: > I'm not sure this is strictly speaking a newbies question, but here we > go. I've got an old OpenBSD server that I wish to virtualize. (It'd > probably be easier to just rebuild it from scratch in a VM, but what's > the fun in that?) > > I nfs-mounted some space to my source system and - after puzzling a > bit over which disk slice to dd - I copied as such: > > dd if=/dev/wd0c of=/mnt/heron/hedgehog bs=512x1008 count=16383 > > I then fired up qemu using the disk image file on the VM host and the > darn thing actually booted to OpenBSD. Woo-hoo! > > However, the VM does not mount the disks after / properly. Which I > guess is not much of a surprise, as the image file produced by dd is > considerably smaller than I would have expected, at 8455200768 bytes > when my source machine has about 15G used. The VM fails to mount other > slices with automatic fsck failing due to bad superblocks and magic > numbers. > > I'm presuming at this point that I have an incomplete disk copy. > > Was wd0c not the correct thing to copy with dd? Did I do something > incorrectly in my dd command? Is there perhaps an 8GB filesize limit > somewhere I'm not aware of? (nfs host is Ubuntu 8.04.) ?Any ideas or > tips to point me in a useful direction? Why did you do "bs=512x1008 count=16383"? By my calculations, that is precisely 7.87 1024-based gigabytes. wd0c is the entire drive, including the bootloader, so that is the correct one to rip, but you want the *entire* drive, so leave off the count= param. From mike at erdelynet.com Wed Mar 11 04:20:56 2009 From: mike at erdelynet.com (Mike Erdely) Date: Tue, 10 Mar 2009 23:20:56 -0400 Subject: OT: setting variables In-Reply-To: <98f5a8830903102011p232b3483s84347d8ea1d6e604@mail.gmail.com> References: <6532b7c80903101937o13caacf5g374fc37d080ecf3d@mail.gmail.com> <98f5a8830903102011p232b3483s84347d8ea1d6e604@mail.gmail.com> Message-ID: <20090311032056.GG12808@erdelynet.com> On Tue, Mar 10, 2009 at 11:11:23PM -0400, Nick Guenther wrote: > This confused me for SO LONG. The trick is to "source" the file > instead of running it as so: > . ./script > or > source ./script > > You'd think "EXPORT" exports the value to the entire OS, but no, it > only exports it beyond the that command line. It sort of makes sense > in the context that can do this to pass variables to programs: > $ VAR=VAL ./script > > Unix is crazy. Actually, read my explanation. It will make sense to you then. Also, export exports the variable to all future sub-shells. Try this: $ ksh $ FOO=bar $ echo $FOO bar $ ksh $ echo $FOO $ exit $ export FOO=bar $ ksh $ echo $FOO bar $ exit $ exit -ME From kousue at gmail.com Wed Mar 11 04:36:01 2009 From: kousue at gmail.com (Nick Guenther) Date: Tue, 10 Mar 2009 23:36:01 -0400 Subject: OT: setting variables In-Reply-To: <20090311032056.GG12808@erdelynet.com> References: <6532b7c80903101937o13caacf5g374fc37d080ecf3d@mail.gmail.com> <98f5a8830903102011p232b3483s84347d8ea1d6e604@mail.gmail.com> <20090311032056.GG12808@erdelynet.com> Message-ID: <98f5a8830903102036u58a61902l5d9e3f593d4f7434@mail.gmail.com> On Tue, Mar 10, 2009 at 11:20 PM, Mike Erdely wrote: > On Tue, Mar 10, 2009 at 11:11:23PM -0400, Nick Guenther wrote: >> This confused me for SO LONG. The trick is to "source" the file >> instead of running it as so: >> . ./script >> or >> source ./script >> >> You'd think "EXPORT" exports the value to the entire OS, but no, it >> only exports it beyond the that command line. It sort of makes sense >> in the context that can do this to pass variables to programs: >> $ VAR=VAL ./script >> >> Unix is crazy. > > Actually, read my explanation. ?It will make sense to you then. It makes sense in a logical-reductionist way, if you focus on the actions and not the words; it's just kind of counter intuitive :) -Nick From brakeb at gmail.com Wed Mar 11 05:54:57 2009 From: brakeb at gmail.com (Bryan) Date: Wed, 11 Mar 2009 04:54:57 +0000 Subject: OT: setting variables In-Reply-To: <98f5a8830903102036u58a61902l5d9e3f593d4f7434@mail.gmail.com> References: <6532b7c80903101937o13caacf5g374fc37d080ecf3d@mail.gmail.com> <98f5a8830903102011p232b3483s84347d8ea1d6e604@mail.gmail.com> <20090311032056.GG12808@erdelynet.com> <98f5a8830903102036u58a61902l5d9e3f593d4f7434@mail.gmail.com> Message-ID: <6532b7c80903102154u62c54782wc92898433049810d@mail.gmail.com> On Wed, Mar 11, 2009 at 03:36, Nick Guenther wrote: > On Tue, Mar 10, 2009 at 11:20 PM, Mike Erdely wrote: >> On Tue, Mar 10, 2009 at 11:11:23PM -0400, Nick Guenther wrote: >>> This confused me for SO LONG. The trick is to "source" the file >>> instead of running it as so: >>> . ./script >>> or >>> source ./script >>> >>> You'd think "EXPORT" exports the value to the entire OS, but no, it >>> only exports it beyond the that command line. It sort of makes sense >>> in the context that can do this to pass variables to programs: >>> $ VAR=VAL ./script >>> >>> Unix is crazy. >> >> Actually, read my explanation. ?It will make sense to you then. > > It makes sense in a logical-reductionist way, if you focus on the > actions and not the words; it's just kind of counter intuitive :) > -Nick Yea, I was thinking about it as I wrote the e-mail. All those months of PHP class came back and I remembered about global variables. I realize that it's not exactly the same, but putting the "echo" statements got me thinking back to that... I will remember this in the future... In my beginning "C" class, they tell you to put in "print" statements to see how far your scripts get before failure... thanks for the help... Bryan Bryan From bsd4me at cableone.net Sat Mar 14 16:45:54 2009 From: bsd4me at cableone.net (Michael) Date: Sat, 14 Mar 2009 09:45:54 -0600 Subject: lbdb question Message-ID: <20090314154554.GA32584@mariahII.my.domain> I haven't been able to get lbdbq to work or even run lbdbq or lbdb-munge. I installed lbdb with pkg_add and the files are in /usr/local/lib/lbdb and programs are in /usr/local/bin/ . If trying to use lbdbq from mutt via "Q", I get this response: lbdbq: No such file or directory I get the same response trying "/usr/local/bin/lbdbq" in a terminal. I do have the set_query command in my .muttrc: set query_command="/usr/local/bin/lbdbq '%s'" What am I missing? Thanks. Mike From marmot at pennswoods.net Sat Mar 14 20:30:40 2009 From: marmot at pennswoods.net (Woodchuck) Date: Sat, 14 Mar 2009 15:30:40 -0400 (EDT) Subject: lbdb question In-Reply-To: <20090314154554.GA32584@mariahII.my.domain> References: <20090314154554.GA32584@mariahII.my.domain> Message-ID: On Sat, 14 Mar 2009, Michael wrote: > I haven't been able to get lbdbq to work or even run lbdbq or lbdb-munge. > I installed lbdb with pkg_add and the files are in /usr/local/lib/lbdb and programs are in /usr/local/bin/ . > If trying to use lbdbq from mutt via "Q", I get this response: > lbdbq: No such file or directory > I get the same response trying "/usr/local/bin/lbdbq" in a terminal. > I do have the set_query command in my .muttrc: > set query_command="/usr/local/bin/lbdbq '%s'" > > What am I missing? > > Thanks. > Mike The shell is finding lbdbq fine; it is lbdbq that can't find some file that it wants, presumably the argument to %s. It looks like this argument is null. (I don't know what lbdbq is, so I don't know what it's supposed to be passed, just that it looks like it's not getting it. I don't use mutt, either. But I saw your post, recognized the error message, and, being bored...) Dave -- Things we used to take for absurd we now take for granted. -- Bill Bonner From bsd4me at cableone.net Sat Mar 14 22:07:46 2009 From: bsd4me at cableone.net (Michael) Date: Sat, 14 Mar 2009 15:07:46 -0600 Subject: lbdb question In-Reply-To: References: <20090314154554.GA32584@mariahII.my.domain> Message-ID: <20090314210746.GA12919@mariah2.my.domain> On Sat, Mar 14, 2009 at 03:30:40PM -0400, Woodchuck wrote: > On Sat, 14 Mar 2009, Michael wrote: > > > I haven't been able to get lbdbq to work or even run lbdbq or lbdb-munge. > > I installed lbdb with pkg_add and the files are in /usr/local/lib/lbdb and programs are in /usr/local/bin/ . > > If trying to use lbdbq from mutt via "Q", I get this response: > > lbdbq: No such file or directory > > I get the same response trying "/usr/local/bin/lbdbq" in a terminal. > > I do have the set_query command in my .muttrc: > > set query_command="/usr/local/bin/lbdbq '%s'" > > > > What am I missing? > > > > Thanks. > > Mike > > The shell is finding lbdbq fine; it is lbdbq that can't find > some file that it wants, presumably the argument to %s. It looks > like this argument is null. > > (I don't know what lbdbq is, so I don't know what it's supposed > to be passed, just that it looks like it's not getting it. I don't > use mutt, either. But I saw your post, recognized the error message, > and, being bored...) > Thanks :) I'll dig a little deeper. I just copied/pasted from the man pages. Mike > Dave > -- > Things we used to take for absurd we now take for granted. > -- Bill Bonner > _______________________________________________ > Openbsd-newbies mailing list > Openbsd-newbies at sfobug.org > http://mailman.theapt.org/listinfo/openbsd-newbies From bsd4me at cableone.net Sat Mar 14 22:22:50 2009 From: bsd4me at cableone.net (Michael) Date: Sat, 14 Mar 2009 15:22:50 -0600 Subject: lbdb question In-Reply-To: References: <20090314154554.GA32584@mariahII.my.domain> Message-ID: <20090314212250.GA13734@mariahII.my.domain> On Sat, Mar 14, 2009 at 03:30:40PM -0400, Woodchuck wrote: > On Sat, 14 Mar 2009, Michael wrote: > > > I haven't been able to get lbdbq to work or even run lbdbq or lbdb-munge. > > I installed lbdb with pkg_add and the files are in /usr/local/lib/lbdb and programs are in /usr/local/bin/ . > > If trying to use lbdbq from mutt via "Q", I get this response: > > lbdbq: No such file or directory > > I get the same response trying "/usr/local/bin/lbdbq" in a terminal. > > I do have the set_query command in my .muttrc: > > set query_command="/usr/local/bin/lbdbq '%s'" > > > > What am I missing? > > > > Thanks. > > Mike > > The shell is finding lbdbq fine; it is lbdbq that can't find > some file that it wants, presumably the argument to %s. It looks > like this argument is null. > > (I don't know what lbdbq is, so I don't know what it's supposed > to be passed, just that it looks like it's not getting it. I don't > use mutt, either. But I saw your post, recognized the error message, > and, being bored...) > > Dave Ok, got it fixed. I didn't change the lp* names in /usr/sbin/ to lp*.old so that the programs in /usr/local/sbin would work :( Mike > -- > Things we used to take for absurd we now take for granted. > -- Bill Bonner > _______________________________________________ > Openbsd-newbies mailing list > Openbsd-newbies at sfobug.org > http://mailman.theapt.org/listinfo/openbsd-newbies From bsd4me at cableone.net Sun Mar 15 01:21:37 2009 From: bsd4me at cableone.net (Michael) Date: Sat, 14 Mar 2009 18:21:37 -0600 Subject: lbdb question In-Reply-To: <20090314212250.GA13734@mariahII.my.domain> References: <20090314154554.GA32584@mariahII.my.domain> <20090314212250.GA13734@mariahII.my.domain> Message-ID: <20090315002137.GA1108@mariahII.my.domain> On Sat, Mar 14, 2009 at 03:22:50PM -0600, Michael wrote: > On Sat, Mar 14, 2009 at 03:30:40PM -0400, Woodchuck wrote: > > On Sat, 14 Mar 2009, Michael wrote: > > > > > I haven't been able to get lbdbq to work or even run lbdbq or lbdb-munge. > > > I installed lbdb with pkg_add and the files are in /usr/local/lib/lbdb and programs are in /usr/local/bin/ . > > > If trying to use lbdbq from mutt via "Q", I get this response: > > > lbdbq: No such file or directory > > > I get the same response trying "/usr/local/bin/lbdbq" in a terminal. > > > I do have the set_query command in my .muttrc: > > > set query_command="/usr/local/bin/lbdbq '%s'" > > > > > > What am I missing? > > > > > > Thanks. > > > Mike > > > > The shell is finding lbdbq fine; it is lbdbq that can't find > > some file that it wants, presumably the argument to %s. It looks > > like this argument is null. > > > > (I don't know what lbdbq is, so I don't know what it's supposed > > to be passed, just that it looks like it's not getting it. I don't > > use mutt, either. But I saw your post, recognized the error message, > > and, being bored...) > > > > Dave > > Ok, got it fixed. I didn't change the lp* names in /usr/sbin/ to lp*.old so that the programs in /usr/local/sbin would work :( > > Mike > Wrote too soon. "Q" from within mutt works, but "lbdbq" at command line doesn't. Mike > > -- > > Things we used to take for absurd we now take for granted. > > -- Bill Bonner > > _______________________________________________ > > Openbsd-newbies mailing list > > Openbsd-newbies at sfobug.org > > http://mailman.theapt.org/listinfo/openbsd-newbies > _______________________________________________ > Openbsd-newbies mailing list > Openbsd-newbies at sfobug.org > http://mailman.theapt.org/listinfo/openbsd-newbies From vim.unix at googlemail.com Fri Mar 20 23:54:38 2009 From: vim.unix at googlemail.com (Pau) Date: Fri, 20 Mar 2009 23:54:38 +0100 Subject: Matplotlib - python does not find pylab In-Reply-To: <98f5a8830903201508x3e4aeceapaacc62f2d33fb46@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> <98f5a8830903031048m1b4836a9j497a64513548e5cc@mail.gmail.com> <30c383e70903031150h7149a0eal9354e847263e2a6a@mail.gmail.com> <30c383e70903201406l1ffe45e3ud8ecaad5bac30fb@mail.gmail.com> <98f5a8830903201508x3e4aeceapaacc62f2d33fb46@mail.gmail.com> Message-ID: <30c383e70903201554v5b83518br4d86e2ef6a6de65f@mail.gmail.com> thanks for the answer, Nick... I actually have a partition on this laptop with linux on it but, as usual, it's broken I have been fxxxing around with matplotlib for half an hour buecause it gave me many errors and now it turns out that it's screwed up: https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/337469 Then I went to the latest release from matplotlib's site, and tried to compile... and guess... python setup.py build breaks with ./CXX/Objects.hxx:190: error: expected `}' at end of input error: command 'gcc' failed with exit status 1 Sorry for spamming this list with rubbish... I will have to wait until 4.5 is released and see whether that fixes it Or I'll try freebsd... but I don't feel like installing it... oh... now I realise I have somewhere a machine running with 4.4! I'll try there Pau 2009/3/20 Nick Guenther : > Hello Pau, > > Hm. > > Try running whatever you're doing that causes this on an Ubuntu or > FreeBSD. If the problem shows up there too contact the various authors > of all the code you're using. If it turns out to be an OpenBSD-only > problem then ask again. > > On Fri, Mar 20, 2009 at 5:06 PM, Pau wrote: >> Hello, >> >> I have again problems with matplotlib. I have made a plot and, when I >> try to save it as eps, I get the error "float argument required" in a >> pop-up window, whilst the terminal shows this error message: >> >> /usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py:1054: >> GtkWarning: Unable to find default local directory monitor type >> ?if self.run() != int(gtk.RESPONSE_OK): >> >> I can save it as pdf, but the quality is horrible. The curves do not >> have the thickness I gave them, for instance. >> >> Any idea? >> >> Thanks >> >> Pau >> >> 2009/3/3 Pau : >>>> That makes sense. That's because `python` is python2.4 for you, as >>>> shown in the first test you ran for me. When you pkg_add python it >>>> tells you >>> >>> yes, I know, but I was puzzled because I could swear I had tried >>> python2.5 and I had had the same problem... >>> >>>> May I suggest that you run those commands? >>> >>> absolutely... but I had already done it >>> >>> Again charmed by the politeness and helpfulness of this mailing list, yours, >>> >>> Pau >>> >>>> >>>> On Tue, Mar 3, 2009 at 1:45 PM, Pau wrote: >>>>> PS: Using >>>>> >>>>> #!/usr/bin/env python >>>>> >>>>> leads to the same problem, even using export LANG=C (this is Python 2.4.6) >>>>> >>>>> Using >>>>> >>>>> #!/usr/bin/env python2.5 >>>>> >>>>> solves it >>>>> >>>>> 2009/3/3 Pau : >>>>>> thanks, Nick >>>>>> >>>>>> I have fixed the problem. >>>>>> >>>>>> I was also thinking that it could be due to this locale thing but, >>>>>> since I started ksh with the default kshrc, I assumed that it'd be >>>>>> export LANG=C per default, but it isn't?? I should not assume >>>>>> anything... >>>>>> >>>>>> Look at this: >>>>>> >>>>>> hux(p2)| ksh >>>>>> $ export LANG=C >>>>>> $ date ? -----------------------------------> This is to check that >>>>>> the LANG is C >>>>>> Tue Mar ?3 19:36:02 CET 2009 --> it is >>>>>> $ ./Pfewbody.py >>>>>> >>>>>> Guess ... it's working now >>>>>> >>>>>> When I export LANG=C in zsh, it's working too >>>>>> >>>>>> I am a bit puzzled. I could swear I had tried this too... >>>>>> >>>>>> Anyway... >>>>>> >>>>>> Thanks again. >>>>>> >>>>>> Pau >>>>>> >>>>>> 2009/3/3 Nick Guenther : >>>>>>> On Tue, Mar 3, 2009 at 12:43 PM, Pau wrote: >>>>>>>> Hello, >>>>>>>> >>>>>>>> I said Ihad tried with different versions of python >>>>>>>> >>>>>>>> $ python2.5 >>>>>>>> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >>>>>>>> [GCC 3.3.5 (propolice)] on openbsd4 >>>>>>>> Type "help", "copyright", "credits" or "license" for more information. >>>>>>>>>>> import pylab >>>>>>>> Traceback (most recent call last): >>>>>>>> ?File "", line 1, in >>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in >>>>>>>> ? ?from matplotlib.pylab import * >>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >>>>>>>> line 129, in >>>>>>>> ? ?from rcsetup import defaultParams, validate_backend, validate_toolbar >>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >>>>>>>> line 19, in >>>>>>>> ? ?from matplotlib.colors import is_color_like >>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >>>>>>>> line 54, in >>>>>>>> ? ?import matplotlib.cbook as cbook >>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >>>>>>>> line 17, in >>>>>>>> ? ?preferredencoding = locale.getpreferredencoding() >>>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding >>>>>>>> ? ?setlocale(LC_CTYPE, "") >>>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale >>>>>>>> ? ?return _setlocale(category, locale) >>>>>>>> locale.Error: unsupported locale setting >>>>>>>> >>>>>>>> This is the output when using ksh with the default config file >>>>>>> >>>>>>> That's not an ImportError. That's a locale.Error. You can see in the >>>>>>> backtrace from matplotlib.pylab import *, and since it doesn't break >>>>>>> there then presumably you have pylab installed. It says the problem: >>>>>>> "unsupported locale setting". I'm no expert on locales, though. >>>>>>> >>>>>>> It is possible that this is a -CURRENT problem. The packages get >>>>>>> rebuilt automatically and not tested. You should report this to the >>>>>>> maintainer of py-matplotlib who is listed here: >>>>>>> >>>>>>> $ make search key=py-matplotlib >>>>>>> Port: ? py-matplotlib-0.83.2p5 >>>>>>> Path: ? graphics/py-matplotlib >>>>>>> Info: ? Python charting and plotting API >>>>>>> Maint: ?Damien Miller >>>>>>> Index: ?graphics devel >>>>>>> L-deps: iconv.>=4::converters/libiconv >>>>>>> intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png >>>>>>> B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>>>>> gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext >>>>>>> python-2.4*:lang/python/2.4 >>>>>>> R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>>>>> gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 >>>>>>> Archs: ?any >>>>>>> >>>>>>> >>>>>>> >>>>>>>> And also: >>>>>>>> >>>>>>>>>>> import sys >>>>>>>>>>> print sys.path >>>>>>>> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >>>>>>>> '/usr/local/lib/python2.5/plat-openbsd4', >>>>>>>> '/usr/local/lib/python2.5/lib-tk', >>>>>>>> '/usr/local/lib/python2.5/lib-dynload', >>>>>>>> '/usr/local/lib/python2.5/site-packages', >>>>>>>> '/usr/local/lib/python2.5/site-packages/Numeric', >>>>>>>> '/usr/local/lib/python2.5/site-packages/gst-0.10', >>>>>>>> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >>>>>>>> >>>>>>>> Do you see something? I don't... >>>>>>> >>>>>>> This list of directories is like your shell $PATH. It doesn't matter >>>>>>> what the dirs themselves are, it matters what the contents of those >>>>>>> dirs are. But, above you've shown that indeed python2.5 can access >>>>>>> pylab so you needn't worry about digging around here. >>>>>>> >>>>>>>> thanks for the help >>>>>>> >>>>>>> Welcome :) >>>>>>> >>>>>>> -Nick >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Let there be peace on earth. And let it begin with misc >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Let there be peace on earth. And let it begin with misc >>>>> >>>> >>> >>> >>> >>> -- >>> Let there be peace on earth. And let it begin with misc >>> >> >> >> >> -- >> Let there be peace on earth. And let it begin with misc >> > -- Let there be peace on earth. And let it begin with misc From kousue at gmail.com Fri Mar 20 23:08:42 2009 From: kousue at gmail.com (Nick Guenther) Date: Fri, 20 Mar 2009 18:08:42 -0400 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903201406l1ffe45e3ud8ecaad5bac30fb@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> <98f5a8830903031048m1b4836a9j497a64513548e5cc@mail.gmail.com> <30c383e70903031150h7149a0eal9354e847263e2a6a@mail.gmail.com> <30c383e70903201406l1ffe45e3ud8ecaad5bac30fb@mail.gmail.com> Message-ID: <98f5a8830903201508x3e4aeceapaacc62f2d33fb46@mail.gmail.com> Hello Pau, Hm. Try running whatever you're doing that causes this on an Ubuntu or FreeBSD. If the problem shows up there too contact the various authors of all the code you're using. If it turns out to be an OpenBSD-only problem then ask again. On Fri, Mar 20, 2009 at 5:06 PM, Pau wrote: > Hello, > > I have again problems with matplotlib. I have made a plot and, when I > try to save it as eps, I get the error "float argument required" in a > pop-up window, whilst the terminal shows this error message: > > /usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py:1054: > GtkWarning: Unable to find default local directory monitor type > ?if self.run() != int(gtk.RESPONSE_OK): > > I can save it as pdf, but the quality is horrible. The curves do not > have the thickness I gave them, for instance. > > Any idea? > > Thanks > > Pau > > 2009/3/3 Pau : >>> That makes sense. That's because `python` is python2.4 for you, as >>> shown in the first test you ran for me. When you pkg_add python it >>> tells you >> >> yes, I know, but I was puzzled because I could swear I had tried >> python2.5 and I had had the same problem... >> >>> May I suggest that you run those commands? >> >> absolutely... but I had already done it >> >> Again charmed by the politeness and helpfulness of this mailing list, yours, >> >> Pau >> >>> >>> On Tue, Mar 3, 2009 at 1:45 PM, Pau wrote: >>>> PS: Using >>>> >>>> #!/usr/bin/env python >>>> >>>> leads to the same problem, even using export LANG=C (this is Python 2.4.6) >>>> >>>> Using >>>> >>>> #!/usr/bin/env python2.5 >>>> >>>> solves it >>>> >>>> 2009/3/3 Pau : >>>>> thanks, Nick >>>>> >>>>> I have fixed the problem. >>>>> >>>>> I was also thinking that it could be due to this locale thing but, >>>>> since I started ksh with the default kshrc, I assumed that it'd be >>>>> export LANG=C per default, but it isn't?? I should not assume >>>>> anything... >>>>> >>>>> Look at this: >>>>> >>>>> hux(p2)| ksh >>>>> $ export LANG=C >>>>> $ date ? -----------------------------------> This is to check that >>>>> the LANG is C >>>>> Tue Mar ?3 19:36:02 CET 2009 --> it is >>>>> $ ./Pfewbody.py >>>>> >>>>> Guess ... it's working now >>>>> >>>>> When I export LANG=C in zsh, it's working too >>>>> >>>>> I am a bit puzzled. I could swear I had tried this too... >>>>> >>>>> Anyway... >>>>> >>>>> Thanks again. >>>>> >>>>> Pau >>>>> >>>>> 2009/3/3 Nick Guenther : >>>>>> On Tue, Mar 3, 2009 at 12:43 PM, Pau wrote: >>>>>>> Hello, >>>>>>> >>>>>>> I said Ihad tried with different versions of python >>>>>>> >>>>>>> $ python2.5 >>>>>>> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >>>>>>> [GCC 3.3.5 (propolice)] on openbsd4 >>>>>>> Type "help", "copyright", "credits" or "license" for more information. >>>>>>>>>> import pylab >>>>>>> Traceback (most recent call last): >>>>>>> ?File "", line 1, in >>>>>>> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in >>>>>>> ? ?from matplotlib.pylab import * >>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >>>>>>> line 129, in >>>>>>> ? ?from rcsetup import defaultParams, validate_backend, validate_toolbar >>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >>>>>>> line 19, in >>>>>>> ? ?from matplotlib.colors import is_color_like >>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >>>>>>> line 54, in >>>>>>> ? ?import matplotlib.cbook as cbook >>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >>>>>>> line 17, in >>>>>>> ? ?preferredencoding = locale.getpreferredencoding() >>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding >>>>>>> ? ?setlocale(LC_CTYPE, "") >>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale >>>>>>> ? ?return _setlocale(category, locale) >>>>>>> locale.Error: unsupported locale setting >>>>>>> >>>>>>> This is the output when using ksh with the default config file >>>>>> >>>>>> That's not an ImportError. That's a locale.Error. You can see in the >>>>>> backtrace from matplotlib.pylab import *, and since it doesn't break >>>>>> there then presumably you have pylab installed. It says the problem: >>>>>> "unsupported locale setting". I'm no expert on locales, though. >>>>>> >>>>>> It is possible that this is a -CURRENT problem. The packages get >>>>>> rebuilt automatically and not tested. You should report this to the >>>>>> maintainer of py-matplotlib who is listed here: >>>>>> >>>>>> $ make search key=py-matplotlib >>>>>> Port: ? py-matplotlib-0.83.2p5 >>>>>> Path: ? graphics/py-matplotlib >>>>>> Info: ? Python charting and plotting API >>>>>> Maint: ?Damien Miller >>>>>> Index: ?graphics devel >>>>>> L-deps: iconv.>=4::converters/libiconv >>>>>> intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png >>>>>> B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>>>> gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext >>>>>> python-2.4*:lang/python/2.4 >>>>>> R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>>>> gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 >>>>>> Archs: ?any >>>>>> >>>>>> >>>>>> >>>>>>> And also: >>>>>>> >>>>>>>>>> import sys >>>>>>>>>> print sys.path >>>>>>> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >>>>>>> '/usr/local/lib/python2.5/plat-openbsd4', >>>>>>> '/usr/local/lib/python2.5/lib-tk', >>>>>>> '/usr/local/lib/python2.5/lib-dynload', >>>>>>> '/usr/local/lib/python2.5/site-packages', >>>>>>> '/usr/local/lib/python2.5/site-packages/Numeric', >>>>>>> '/usr/local/lib/python2.5/site-packages/gst-0.10', >>>>>>> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >>>>>>> >>>>>>> Do you see something? I don't... >>>>>> >>>>>> This list of directories is like your shell $PATH. It doesn't matter >>>>>> what the dirs themselves are, it matters what the contents of those >>>>>> dirs are. But, above you've shown that indeed python2.5 can access >>>>>> pylab so you needn't worry about digging around here. >>>>>> >>>>>>> thanks for the help >>>>>> >>>>>> Welcome :) >>>>>> >>>>>> -Nick >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Let there be peace on earth. And let it begin with misc >>>>> >>>> >>>> >>>> >>>> -- >>>> Let there be peace on earth. And let it begin with misc >>>> >>> >> >> >> >> -- >> Let there be peace on earth. And let it begin with misc >> > > > > -- > Let there be peace on earth. And let it begin with misc > From vim.unix at googlemail.com Fri Mar 20 22:06:32 2009 From: vim.unix at googlemail.com (Pau) Date: Fri, 20 Mar 2009 22:06:32 +0100 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903031150h7149a0eal9354e847263e2a6a@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903030925i6cb60b60rb96b97dce45db05d@mail.gmail.com> <30c383e70903030931l509791a5offf29649709f0fdd@mail.gmail.com> <98f5a8830903030935o5cdbfb69v2f646c530ab90341@mail.gmail.com> <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> <98f5a8830903031048m1b4836a9j497a64513548e5cc@mail.gmail.com> <30c383e70903031150h7149a0eal9354e847263e2a6a@mail.gmail.com> Message-ID: <30c383e70903201406l1ffe45e3ud8ecaad5bac30fb@mail.gmail.com> Hello, I have again problems with matplotlib. I have made a plot and, when I try to save it as eps, I get the error "float argument required" in a pop-up window, whilst the terminal shows this error message: /usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py:1054: GtkWarning: Unable to find default local directory monitor type if self.run() != int(gtk.RESPONSE_OK): I can save it as pdf, but the quality is horrible. The curves do not have the thickness I gave them, for instance. Any idea? Thanks Pau 2009/3/3 Pau : >> That makes sense. That's because `python` is python2.4 for you, as >> shown in the first test you ran for me. When you pkg_add python it >> tells you > > yes, I know, but I was puzzled because I could swear I had tried > python2.5 and I had had the same problem... > >> May I suggest that you run those commands? > > absolutely... but I had already done it > > Again charmed by the politeness and helpfulness of this mailing list, yours, > > Pau > >> >> On Tue, Mar 3, 2009 at 1:45 PM, Pau wrote: >>> PS: Using >>> >>> #!/usr/bin/env python >>> >>> leads to the same problem, even using export LANG=C (this is Python 2.4.6) >>> >>> Using >>> >>> #!/usr/bin/env python2.5 >>> >>> solves it >>> >>> 2009/3/3 Pau : >>>> thanks, Nick >>>> >>>> I have fixed the problem. >>>> >>>> I was also thinking that it could be due to this locale thing but, >>>> since I started ksh with the default kshrc, I assumed that it'd be >>>> export LANG=C per default, but it isn't?? I should not assume >>>> anything... >>>> >>>> Look at this: >>>> >>>> hux(p2)| ksh >>>> $ export LANG=C >>>> $ date ? -----------------------------------> This is to check that >>>> the LANG is C >>>> Tue Mar ?3 19:36:02 CET 2009 --> it is >>>> $ ./Pfewbody.py >>>> >>>> Guess ... it's working now >>>> >>>> When I export LANG=C in zsh, it's working too >>>> >>>> I am a bit puzzled. I could swear I had tried this too... >>>> >>>> Anyway... >>>> >>>> Thanks again. >>>> >>>> Pau >>>> >>>> 2009/3/3 Nick Guenther : >>>>> On Tue, Mar 3, 2009 at 12:43 PM, Pau wrote: >>>>>> Hello, >>>>>> >>>>>> I said Ihad tried with different versions of python >>>>>> >>>>>> $ python2.5 >>>>>> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >>>>>> [GCC 3.3.5 (propolice)] on openbsd4 >>>>>> Type "help", "copyright", "credits" or "license" for more information. >>>>>>>>> import pylab >>>>>> Traceback (most recent call last): >>>>>> ?File "", line 1, in >>>>>> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in >>>>>> ? ?from matplotlib.pylab import * >>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >>>>>> line 129, in >>>>>> ? ?from rcsetup import defaultParams, validate_backend, validate_toolbar >>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >>>>>> line 19, in >>>>>> ? ?from matplotlib.colors import is_color_like >>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >>>>>> line 54, in >>>>>> ? ?import matplotlib.cbook as cbook >>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >>>>>> line 17, in >>>>>> ? ?preferredencoding = locale.getpreferredencoding() >>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding >>>>>> ? ?setlocale(LC_CTYPE, "") >>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale >>>>>> ? ?return _setlocale(category, locale) >>>>>> locale.Error: unsupported locale setting >>>>>> >>>>>> This is the output when using ksh with the default config file >>>>> >>>>> That's not an ImportError. That's a locale.Error. You can see in the >>>>> backtrace from matplotlib.pylab import *, and since it doesn't break >>>>> there then presumably you have pylab installed. It says the problem: >>>>> "unsupported locale setting". I'm no expert on locales, though. >>>>> >>>>> It is possible that this is a -CURRENT problem. The packages get >>>>> rebuilt automatically and not tested. You should report this to the >>>>> maintainer of py-matplotlib who is listed here: >>>>> >>>>> $ make search key=py-matplotlib >>>>> Port: ? py-matplotlib-0.83.2p5 >>>>> Path: ? graphics/py-matplotlib >>>>> Info: ? Python charting and plotting API >>>>> Maint: ?Damien Miller >>>>> Index: ?graphics devel >>>>> L-deps: iconv.>=4::converters/libiconv >>>>> intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png >>>>> B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>>> gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext >>>>> python-2.4*:lang/python/2.4 >>>>> R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>>> gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 >>>>> Archs: ?any >>>>> >>>>> >>>>> >>>>>> And also: >>>>>> >>>>>>>>> import sys >>>>>>>>> print sys.path >>>>>> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >>>>>> '/usr/local/lib/python2.5/plat-openbsd4', >>>>>> '/usr/local/lib/python2.5/lib-tk', >>>>>> '/usr/local/lib/python2.5/lib-dynload', >>>>>> '/usr/local/lib/python2.5/site-packages', >>>>>> '/usr/local/lib/python2.5/site-packages/Numeric', >>>>>> '/usr/local/lib/python2.5/site-packages/gst-0.10', >>>>>> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >>>>>> >>>>>> Do you see something? I don't... >>>>> >>>>> This list of directories is like your shell $PATH. It doesn't matter >>>>> what the dirs themselves are, it matters what the contents of those >>>>> dirs are. But, above you've shown that indeed python2.5 can access >>>>> pylab so you needn't worry about digging around here. >>>>> >>>>>> thanks for the help >>>>> >>>>> Welcome :) >>>>> >>>>> -Nick >>>>> >>>> >>>> >>>> >>>> -- >>>> Let there be peace on earth. And let it begin with misc >>>> >>> >>> >>> >>> -- >>> Let there be peace on earth. And let it begin with misc >>> >> > > > > -- > Let there be peace on earth. And let it begin with misc > -- Let there be peace on earth. And let it begin with misc From vim.unix at googlemail.com Sun Mar 22 16:29:57 2009 From: vim.unix at googlemail.com (Pau) Date: Sun, 22 Mar 2009 16:29:57 +0100 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903201554v5b83518br4d86e2ef6a6de65f@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <30c383e70903030943n38177c04sc8d237d901ae249d@mail.gmail.com> <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> <98f5a8830903031048m1b4836a9j497a64513548e5cc@mail.gmail.com> <30c383e70903031150h7149a0eal9354e847263e2a6a@mail.gmail.com> <30c383e70903201406l1ffe45e3ud8ecaad5bac30fb@mail.gmail.com> <98f5a8830903201508x3e4aeceapaacc62f2d33fb46@mail.gmail.com> <30c383e70903201554v5b83518br4d86e2ef6a6de65f@mail.gmail.com> Message-ID: <30c383e70903220829q668e9745ue8a8780879d106af@mail.gmail.com> Hullo, I just wanted to let you know that I have the same problem with fedora10, so this is not related to OpenBSD... I'll have to scratch my head a bit... "float argument required" ... I wonder what this means... I have google for a while... thanks Pau 2009/3/20 Pau : > thanks for the answer, Nick... > > I actually have a partition on this laptop with linux on it but, as > usual, it's broken > > I have been fxxxing around with matplotlib for half an hour buecause > it gave me many errors and now it turns out that it's screwed up: > > https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/337469 > > Then I went to the latest release from matplotlib's site, and tried to > compile... and guess... > > python setup.py build > > breaks with > > ./CXX/Objects.hxx:190: error: expected `}' at end of input > error: command 'gcc' failed with exit status 1 > > Sorry for spamming this list with rubbish... I will have to wait until > 4.5 is released and see whether that fixes it > > Or I'll try freebsd... but I don't feel like installing it... > > oh... now I realise I have somewhere a machine running with 4.4! > > I'll try there > > Pau > > 2009/3/20 Nick Guenther : >> Hello Pau, >> >> Hm. >> >> Try running whatever you're doing that causes this on an Ubuntu or >> FreeBSD. If the problem shows up there too contact the various authors >> of all the code you're using. If it turns out to be an OpenBSD-only >> problem then ask again. >> >> On Fri, Mar 20, 2009 at 5:06 PM, Pau wrote: >>> Hello, >>> >>> I have again problems with matplotlib. I have made a plot and, when I >>> try to save it as eps, I get the error "float argument required" in a >>> pop-up window, whilst the terminal shows this error message: >>> >>> /usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py:1054: >>> GtkWarning: Unable to find default local directory monitor type >>> ?if self.run() != int(gtk.RESPONSE_OK): >>> >>> I can save it as pdf, but the quality is horrible. The curves do not >>> have the thickness I gave them, for instance. >>> >>> Any idea? >>> >>> Thanks >>> >>> Pau >>> >>> 2009/3/3 Pau : >>>>> That makes sense. That's because `python` is python2.4 for you, as >>>>> shown in the first test you ran for me. When you pkg_add python it >>>>> tells you >>>> >>>> yes, I know, but I was puzzled because I could swear I had tried >>>> python2.5 and I had had the same problem... >>>> >>>>> May I suggest that you run those commands? >>>> >>>> absolutely... but I had already done it >>>> >>>> Again charmed by the politeness and helpfulness of this mailing list, yours, >>>> >>>> Pau >>>> >>>>> >>>>> On Tue, Mar 3, 2009 at 1:45 PM, Pau wrote: >>>>>> PS: Using >>>>>> >>>>>> #!/usr/bin/env python >>>>>> >>>>>> leads to the same problem, even using export LANG=C (this is Python 2.4.6) >>>>>> >>>>>> Using >>>>>> >>>>>> #!/usr/bin/env python2.5 >>>>>> >>>>>> solves it >>>>>> >>>>>> 2009/3/3 Pau : >>>>>>> thanks, Nick >>>>>>> >>>>>>> I have fixed the problem. >>>>>>> >>>>>>> I was also thinking that it could be due to this locale thing but, >>>>>>> since I started ksh with the default kshrc, I assumed that it'd be >>>>>>> export LANG=C per default, but it isn't?? I should not assume >>>>>>> anything... >>>>>>> >>>>>>> Look at this: >>>>>>> >>>>>>> hux(p2)| ksh >>>>>>> $ export LANG=C >>>>>>> $ date ? -----------------------------------> This is to check that >>>>>>> the LANG is C >>>>>>> Tue Mar ?3 19:36:02 CET 2009 --> it is >>>>>>> $ ./Pfewbody.py >>>>>>> >>>>>>> Guess ... it's working now >>>>>>> >>>>>>> When I export LANG=C in zsh, it's working too >>>>>>> >>>>>>> I am a bit puzzled. I could swear I had tried this too... >>>>>>> >>>>>>> Anyway... >>>>>>> >>>>>>> Thanks again. >>>>>>> >>>>>>> Pau >>>>>>> >>>>>>> 2009/3/3 Nick Guenther : >>>>>>>> On Tue, Mar 3, 2009 at 12:43 PM, Pau wrote: >>>>>>>>> Hello, >>>>>>>>> >>>>>>>>> I said Ihad tried with different versions of python >>>>>>>>> >>>>>>>>> $ python2.5 >>>>>>>>> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >>>>>>>>> [GCC 3.3.5 (propolice)] on openbsd4 >>>>>>>>> Type "help", "copyright", "credits" or "license" for more information. >>>>>>>>>>>> import pylab >>>>>>>>> Traceback (most recent call last): >>>>>>>>> ?File "", line 1, in >>>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, in >>>>>>>>> ? ?from matplotlib.pylab import * >>>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >>>>>>>>> line 129, in >>>>>>>>> ? ?from rcsetup import defaultParams, validate_backend, validate_toolbar >>>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >>>>>>>>> line 19, in >>>>>>>>> ? ?from matplotlib.colors import is_color_like >>>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >>>>>>>>> line 54, in >>>>>>>>> ? ?import matplotlib.cbook as cbook >>>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >>>>>>>>> line 17, in >>>>>>>>> ? ?preferredencoding = locale.getpreferredencoding() >>>>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 514, in getpreferredencoding >>>>>>>>> ? ?setlocale(LC_CTYPE, "") >>>>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 478, in setlocale >>>>>>>>> ? ?return _setlocale(category, locale) >>>>>>>>> locale.Error: unsupported locale setting >>>>>>>>> >>>>>>>>> This is the output when using ksh with the default config file >>>>>>>> >>>>>>>> That's not an ImportError. That's a locale.Error. You can see in the >>>>>>>> backtrace from matplotlib.pylab import *, and since it doesn't break >>>>>>>> there then presumably you have pylab installed. It says the problem: >>>>>>>> "unsupported locale setting". I'm no expert on locales, though. >>>>>>>> >>>>>>>> It is possible that this is a -CURRENT problem. The packages get >>>>>>>> rebuilt automatically and not tested. You should report this to the >>>>>>>> maintainer of py-matplotlib who is listed here: >>>>>>>> >>>>>>>> $ make search key=py-matplotlib >>>>>>>> Port: ? py-matplotlib-0.83.2p5 >>>>>>>> Path: ? graphics/py-matplotlib >>>>>>>> Info: ? Python charting and plotting API >>>>>>>> Maint: ?Damien Miller >>>>>>>> Index: ?graphics devel >>>>>>>> L-deps: iconv.>=4::converters/libiconv >>>>>>>> intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png >>>>>>>> B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>>>>>> gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext >>>>>>>> python-2.4*:lang/python/2.4 >>>>>>>> R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric :x11/py-gtk2 >>>>>>>> gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 >>>>>>>> Archs: ?any >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> And also: >>>>>>>>> >>>>>>>>>>>> import sys >>>>>>>>>>>> print sys.path >>>>>>>>> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >>>>>>>>> '/usr/local/lib/python2.5/plat-openbsd4', >>>>>>>>> '/usr/local/lib/python2.5/lib-tk', >>>>>>>>> '/usr/local/lib/python2.5/lib-dynload', >>>>>>>>> '/usr/local/lib/python2.5/site-packages', >>>>>>>>> '/usr/local/lib/python2.5/site-packages/Numeric', >>>>>>>>> '/usr/local/lib/python2.5/site-packages/gst-0.10', >>>>>>>>> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >>>>>>>>> >>>>>>>>> Do you see something? I don't... >>>>>>>> >>>>>>>> This list of directories is like your shell $PATH. It doesn't matter >>>>>>>> what the dirs themselves are, it matters what the contents of those >>>>>>>> dirs are. But, above you've shown that indeed python2.5 can access >>>>>>>> pylab so you needn't worry about digging around here. >>>>>>>> >>>>>>>>> thanks for the help >>>>>>>> >>>>>>>> Welcome :) >>>>>>>> >>>>>>>> -Nick >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Let there be peace on earth. And let it begin with misc >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Let there be peace on earth. And let it begin with misc >>>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> Let there be peace on earth. And let it begin with misc >>>> >>> >>> >>> >>> -- >>> Let there be peace on earth. And let it begin with misc >>> >> > > > > -- > Let there be peace on earth. And let it begin with misc > -- Let there be peace on earth. And let it begin with misc From kousue at gmail.com Sun Mar 22 16:42:07 2009 From: kousue at gmail.com (Nick Guenther) Date: Sun, 22 Mar 2009 11:42:07 -0400 Subject: Matplotlib - python does not find pylab In-Reply-To: <30c383e70903220829q668e9745ue8a8780879d106af@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <98f5a8830903031017j140fe727oa1158637438858fe@mail.gmail.com> <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> <98f5a8830903031048m1b4836a9j497a64513548e5cc@mail.gmail.com> <30c383e70903031150h7149a0eal9354e847263e2a6a@mail.gmail.com> <30c383e70903201406l1ffe45e3ud8ecaad5bac30fb@mail.gmail.com> <98f5a8830903201508x3e4aeceapaacc62f2d33fb46@mail.gmail.com> <30c383e70903201554v5b83518br4d86e2ef6a6de65f@mail.gmail.com> <30c383e70903220829q668e9745ue8a8780879d106af@mail.gmail.com> Message-ID: <98f5a8830903220842o3b6aee62g1e3c888634059df9@mail.gmail.com> It means a bug. The exception means some function was expecting a decimal-point number but got something else. Report it to the authors. On 22/03/2009, Pau wrote: > Hullo, > > I just wanted to let you know that I have the same problem with > fedora10, so this is not related to OpenBSD... > > I'll have to scratch my head a bit... "float argument required" ... I > wonder what this means... I have google for a while... > > thanks > > Pau > > 2009/3/20 Pau : >> thanks for the answer, Nick... >> >> I actually have a partition on this laptop with linux on it but, as >> usual, it's broken >> >> I have been fxxxing around with matplotlib for half an hour buecause >> it gave me many errors and now it turns out that it's screwed up: >> >> https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/337469 >> >> Then I went to the latest release from matplotlib's site, and tried to >> compile... and guess... >> >> python setup.py build >> >> breaks with >> >> ./CXX/Objects.hxx:190: error: expected `}' at end of input >> error: command 'gcc' failed with exit status 1 >> >> Sorry for spamming this list with rubbish... I will have to wait until >> 4.5 is released and see whether that fixes it >> >> Or I'll try freebsd... but I don't feel like installing it... >> >> oh... now I realise I have somewhere a machine running with 4.4! >> >> I'll try there >> >> Pau >> >> 2009/3/20 Nick Guenther : >>> Hello Pau, >>> >>> Hm. >>> >>> Try running whatever you're doing that causes this on an Ubuntu or >>> FreeBSD. If the problem shows up there too contact the various authors >>> of all the code you're using. If it turns out to be an OpenBSD-only >>> problem then ask again. >>> >>> On Fri, Mar 20, 2009 at 5:06 PM, Pau wrote: >>>> Hello, >>>> >>>> I have again problems with matplotlib. I have made a plot and, when I >>>> try to save it as eps, I get the error "float argument required" in a >>>> pop-up window, whilst the terminal shows this error message: >>>> >>>> /usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py:1054: >>>> GtkWarning: Unable to find default local directory monitor type >>>> ?if self.run() != int(gtk.RESPONSE_OK): >>>> >>>> I can save it as pdf, but the quality is horrible. The curves do not >>>> have the thickness I gave them, for instance. >>>> >>>> Any idea? >>>> >>>> Thanks >>>> >>>> Pau >>>> >>>> 2009/3/3 Pau : >>>>>> That makes sense. That's because `python` is python2.4 for you, as >>>>>> shown in the first test you ran for me. When you pkg_add python it >>>>>> tells you >>>>> >>>>> yes, I know, but I was puzzled because I could swear I had tried >>>>> python2.5 and I had had the same problem... >>>>> >>>>>> May I suggest that you run those commands? >>>>> >>>>> absolutely... but I had already done it >>>>> >>>>> Again charmed by the politeness and helpfulness of this mailing list, >>>>> yours, >>>>> >>>>> Pau >>>>> >>>>>> >>>>>> On Tue, Mar 3, 2009 at 1:45 PM, Pau wrote: >>>>>>> PS: Using >>>>>>> >>>>>>> #!/usr/bin/env python >>>>>>> >>>>>>> leads to the same problem, even using export LANG=C (this is Python >>>>>>> 2.4.6) >>>>>>> >>>>>>> Using >>>>>>> >>>>>>> #!/usr/bin/env python2.5 >>>>>>> >>>>>>> solves it >>>>>>> >>>>>>> 2009/3/3 Pau : >>>>>>>> thanks, Nick >>>>>>>> >>>>>>>> I have fixed the problem. >>>>>>>> >>>>>>>> I was also thinking that it could be due to this locale thing but, >>>>>>>> since I started ksh with the default kshrc, I assumed that it'd be >>>>>>>> export LANG=C per default, but it isn't?? I should not assume >>>>>>>> anything... >>>>>>>> >>>>>>>> Look at this: >>>>>>>> >>>>>>>> hux(p2)| ksh >>>>>>>> $ export LANG=C >>>>>>>> $ date ? -----------------------------------> This is to check that >>>>>>>> the LANG is C >>>>>>>> Tue Mar ?3 19:36:02 CET 2009 --> it is >>>>>>>> $ ./Pfewbody.py >>>>>>>> >>>>>>>> Guess ... it's working now >>>>>>>> >>>>>>>> When I export LANG=C in zsh, it's working too >>>>>>>> >>>>>>>> I am a bit puzzled. I could swear I had tried this too... >>>>>>>> >>>>>>>> Anyway... >>>>>>>> >>>>>>>> Thanks again. >>>>>>>> >>>>>>>> Pau >>>>>>>> >>>>>>>> 2009/3/3 Nick Guenther : >>>>>>>>> On Tue, Mar 3, 2009 at 12:43 PM, Pau >>>>>>>>> wrote: >>>>>>>>>> Hello, >>>>>>>>>> >>>>>>>>>> I said Ihad tried with different versions of python >>>>>>>>>> >>>>>>>>>> $ python2.5 >>>>>>>>>> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >>>>>>>>>> [GCC 3.3.5 (propolice)] on openbsd4 >>>>>>>>>> Type "help", "copyright", "credits" or "license" for more >>>>>>>>>> information. >>>>>>>>>>>>> import pylab >>>>>>>>>> Traceback (most recent call last): >>>>>>>>>> ?File "", line 1, in >>>>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, >>>>>>>>>> in >>>>>>>>>> ? ?from matplotlib.pylab import * >>>>>>>>>> ?File >>>>>>>>>> "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >>>>>>>>>> line 129, in >>>>>>>>>> ? ?from rcsetup import defaultParams, validate_backend, >>>>>>>>>> validate_toolbar >>>>>>>>>> ?File >>>>>>>>>> "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >>>>>>>>>> line 19, in >>>>>>>>>> ? ?from matplotlib.colors import is_color_like >>>>>>>>>> ?File >>>>>>>>>> "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >>>>>>>>>> line 54, in >>>>>>>>>> ? ?import matplotlib.cbook as cbook >>>>>>>>>> ?File >>>>>>>>>> "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >>>>>>>>>> line 17, in >>>>>>>>>> ? ?preferredencoding = locale.getpreferredencoding() >>>>>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 514, in >>>>>>>>>> getpreferredencoding >>>>>>>>>> ? ?setlocale(LC_CTYPE, "") >>>>>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 478, in >>>>>>>>>> setlocale >>>>>>>>>> ? ?return _setlocale(category, locale) >>>>>>>>>> locale.Error: unsupported locale setting >>>>>>>>>> >>>>>>>>>> This is the output when using ksh with the default config file >>>>>>>>> >>>>>>>>> That's not an ImportError. That's a locale.Error. You can see in >>>>>>>>> the >>>>>>>>> backtrace from matplotlib.pylab import *, and since it doesn't >>>>>>>>> break >>>>>>>>> there then presumably you have pylab installed. It says the >>>>>>>>> problem: >>>>>>>>> "unsupported locale setting". I'm no expert on locales, though. >>>>>>>>> >>>>>>>>> It is possible that this is a -CURRENT problem. The packages get >>>>>>>>> rebuilt automatically and not tested. You should report this to >>>>>>>>> the >>>>>>>>> maintainer of py-matplotlib who is listed here: >>>>>>>>> >>>>>>>>> $ make search key=py-matplotlib >>>>>>>>> Port: ? py-matplotlib-0.83.2p5 >>>>>>>>> Path: ? graphics/py-matplotlib >>>>>>>>> Info: ? Python charting and plotting API >>>>>>>>> Maint: ?Damien Miller >>>>>>>>> Index: ?graphics devel >>>>>>>>> L-deps: iconv.>=4::converters/libiconv >>>>>>>>> intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png >>>>>>>>> B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric >>>>>>>>> :x11/py-gtk2 >>>>>>>>> gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext >>>>>>>>> python-2.4*:lang/python/2.4 >>>>>>>>> R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric >>>>>>>>> :x11/py-gtk2 >>>>>>>>> gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 >>>>>>>>> Archs: ?any >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>>> And also: >>>>>>>>>> >>>>>>>>>>>>> import sys >>>>>>>>>>>>> print sys.path >>>>>>>>>> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >>>>>>>>>> '/usr/local/lib/python2.5/plat-openbsd4', >>>>>>>>>> '/usr/local/lib/python2.5/lib-tk', >>>>>>>>>> '/usr/local/lib/python2.5/lib-dynload', >>>>>>>>>> '/usr/local/lib/python2.5/site-packages', >>>>>>>>>> '/usr/local/lib/python2.5/site-packages/Numeric', >>>>>>>>>> '/usr/local/lib/python2.5/site-packages/gst-0.10', >>>>>>>>>> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >>>>>>>>>> >>>>>>>>>> Do you see something? I don't... >>>>>>>>> >>>>>>>>> This list of directories is like your shell $PATH. It doesn't >>>>>>>>> matter >>>>>>>>> what the dirs themselves are, it matters what the contents of >>>>>>>>> those >>>>>>>>> dirs are. But, above you've shown that indeed python2.5 can access >>>>>>>>> pylab so you needn't worry about digging around here. >>>>>>>>> >>>>>>>>>> thanks for the help >>>>>>>>> >>>>>>>>> Welcome :) >>>>>>>>> >>>>>>>>> -Nick >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Let there be peace on earth. And let it begin with misc >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Let there be peace on earth. And let it begin with misc >>>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Let there be peace on earth. And let it begin with misc >>>>> >>>> >>>> >>>> >>>> -- >>>> Let there be peace on earth. And let it begin with misc >>>> >>> >> >> >> >> -- >> Let there be peace on earth. And let it begin with misc >> > > > > -- > Let there be peace on earth. And let it begin with misc > From kousue at gmail.com Sun Mar 22 19:59:01 2009 From: kousue at gmail.com (Nick Guenther) Date: Sun, 22 Mar 2009 14:59:01 -0400 Subject: Matplotlib - python does not find pylab In-Reply-To: <98f5a8830903220842o3b6aee62g1e3c888634059df9@mail.gmail.com> References: <30c383e70903030918n421694cck487ec9945d20b98c@mail.gmail.com> <30c383e70903031040o68c0774dja2b3cc40c1582085@mail.gmail.com> <30c383e70903031045v4a407f22v569ab126308ebc30@mail.gmail.com> <98f5a8830903031048m1b4836a9j497a64513548e5cc@mail.gmail.com> <30c383e70903031150h7149a0eal9354e847263e2a6a@mail.gmail.com> <30c383e70903201406l1ffe45e3ud8ecaad5bac30fb@mail.gmail.com> <98f5a8830903201508x3e4aeceapaacc62f2d33fb46@mail.gmail.com> <30c383e70903201554v5b83518br4d86e2ef6a6de65f@mail.gmail.com> <30c383e70903220829q668e9745ue8a8780879d106af@mail.gmail.com> <98f5a8830903220842o3b6aee62g1e3c888634059df9@mail.gmail.com> Message-ID: <98f5a8830903221159o2d8f9036yacf96f04f7d7831f@mail.gmail.com> It could also be a problem in your code. Are you writing an int somewhere the examples show a float? I love python but sometimes poorly documented interfaces and dynamic typing can lead to obscure crashes deep in library code, instead of at compile time. -Nick On 22/03/2009, Nick Guenther wrote: > It means a bug. The exception means some function was expecting a > decimal-point number but got something else. Report it to the > authors. > > On 22/03/2009, Pau wrote: >> Hullo, >> >> I just wanted to let you know that I have the same problem with >> fedora10, so this is not related to OpenBSD... >> >> I'll have to scratch my head a bit... "float argument required" ... I >> wonder what this means... I have google for a while... >> >> thanks >> >> Pau >> >> 2009/3/20 Pau : >>> thanks for the answer, Nick... >>> >>> I actually have a partition on this laptop with linux on it but, as >>> usual, it's broken >>> >>> I have been fxxxing around with matplotlib for half an hour buecause >>> it gave me many errors and now it turns out that it's screwed up: >>> >>> https://bugs.launchpad.net/ubuntu/+source/matplotlib/+bug/337469 >>> >>> Then I went to the latest release from matplotlib's site, and tried to >>> compile... and guess... >>> >>> python setup.py build >>> >>> breaks with >>> >>> ./CXX/Objects.hxx:190: error: expected `}' at end of input >>> error: command 'gcc' failed with exit status 1 >>> >>> Sorry for spamming this list with rubbish... I will have to wait until >>> 4.5 is released and see whether that fixes it >>> >>> Or I'll try freebsd... but I don't feel like installing it... >>> >>> oh... now I realise I have somewhere a machine running with 4.4! >>> >>> I'll try there >>> >>> Pau >>> >>> 2009/3/20 Nick Guenther : >>>> Hello Pau, >>>> >>>> Hm. >>>> >>>> Try running whatever you're doing that causes this on an Ubuntu or >>>> FreeBSD. If the problem shows up there too contact the various authors >>>> of all the code you're using. If it turns out to be an OpenBSD-only >>>> problem then ask again. >>>> >>>> On Fri, Mar 20, 2009 at 5:06 PM, Pau wrote: >>>>> Hello, >>>>> >>>>> I have again problems with matplotlib. I have made a plot and, when I >>>>> try to save it as eps, I get the error "float argument required" in a >>>>> pop-up window, whilst the terminal shows this error message: >>>>> >>>>> /usr/local/lib/python2.5/site-packages/matplotlib/backends/backend_gtk.py:1054: >>>>> GtkWarning: Unable to find default local directory monitor type >>>>> ?if self.run() != int(gtk.RESPONSE_OK): >>>>> >>>>> I can save it as pdf, but the quality is horrible. The curves do not >>>>> have the thickness I gave them, for instance. >>>>> >>>>> Any idea? >>>>> >>>>> Thanks >>>>> >>>>> Pau >>>>> >>>>> 2009/3/3 Pau : >>>>>>> That makes sense. That's because `python` is python2.4 for you, as >>>>>>> shown in the first test you ran for me. When you pkg_add python it >>>>>>> tells you >>>>>> >>>>>> yes, I know, but I was puzzled because I could swear I had tried >>>>>> python2.5 and I had had the same problem... >>>>>> >>>>>>> May I suggest that you run those commands? >>>>>> >>>>>> absolutely... but I had already done it >>>>>> >>>>>> Again charmed by the politeness and helpfulness of this mailing list, >>>>>> yours, >>>>>> >>>>>> Pau >>>>>> >>>>>>> >>>>>>> On Tue, Mar 3, 2009 at 1:45 PM, Pau wrote: >>>>>>>> PS: Using >>>>>>>> >>>>>>>> #!/usr/bin/env python >>>>>>>> >>>>>>>> leads to the same problem, even using export LANG=C (this is Python >>>>>>>> 2.4.6) >>>>>>>> >>>>>>>> Using >>>>>>>> >>>>>>>> #!/usr/bin/env python2.5 >>>>>>>> >>>>>>>> solves it >>>>>>>> >>>>>>>> 2009/3/3 Pau : >>>>>>>>> thanks, Nick >>>>>>>>> >>>>>>>>> I have fixed the problem. >>>>>>>>> >>>>>>>>> I was also thinking that it could be due to this locale thing but, >>>>>>>>> since I started ksh with the default kshrc, I assumed that it'd be >>>>>>>>> export LANG=C per default, but it isn't?? I should not assume >>>>>>>>> anything... >>>>>>>>> >>>>>>>>> Look at this: >>>>>>>>> >>>>>>>>> hux(p2)| ksh >>>>>>>>> $ export LANG=C >>>>>>>>> $ date ? -----------------------------------> This is to check >>>>>>>>> that >>>>>>>>> the LANG is C >>>>>>>>> Tue Mar ?3 19:36:02 CET 2009 --> it is >>>>>>>>> $ ./Pfewbody.py >>>>>>>>> >>>>>>>>> Guess ... it's working now >>>>>>>>> >>>>>>>>> When I export LANG=C in zsh, it's working too >>>>>>>>> >>>>>>>>> I am a bit puzzled. I could swear I had tried this too... >>>>>>>>> >>>>>>>>> Anyway... >>>>>>>>> >>>>>>>>> Thanks again. >>>>>>>>> >>>>>>>>> Pau >>>>>>>>> >>>>>>>>> 2009/3/3 Nick Guenther : >>>>>>>>>> On Tue, Mar 3, 2009 at 12:43 PM, Pau >>>>>>>>>> wrote: >>>>>>>>>>> Hello, >>>>>>>>>>> >>>>>>>>>>> I said Ihad tried with different versions of python >>>>>>>>>>> >>>>>>>>>>> $ python2.5 >>>>>>>>>>> Python 2.5.4 (r254:67916, Feb 26 2009, 18:20:08) >>>>>>>>>>> [GCC 3.3.5 (propolice)] on openbsd4 >>>>>>>>>>> Type "help", "copyright", "credits" or "license" for more >>>>>>>>>>> information. >>>>>>>>>>>>>> import pylab >>>>>>>>>>> Traceback (most recent call last): >>>>>>>>>>> ?File "", line 1, in >>>>>>>>>>> ?File "/usr/local/lib/python2.5/site-packages/pylab.py", line 1, >>>>>>>>>>> in >>>>>>>>>>> ? ?from matplotlib.pylab import * >>>>>>>>>>> ?File >>>>>>>>>>> "/usr/local/lib/python2.5/site-packages/matplotlib/__init__.py", >>>>>>>>>>> line 129, in >>>>>>>>>>> ? ?from rcsetup import defaultParams, validate_backend, >>>>>>>>>>> validate_toolbar >>>>>>>>>>> ?File >>>>>>>>>>> "/usr/local/lib/python2.5/site-packages/matplotlib/rcsetup.py", >>>>>>>>>>> line 19, in >>>>>>>>>>> ? ?from matplotlib.colors import is_color_like >>>>>>>>>>> ?File >>>>>>>>>>> "/usr/local/lib/python2.5/site-packages/matplotlib/colors.py", >>>>>>>>>>> line 54, in >>>>>>>>>>> ? ?import matplotlib.cbook as cbook >>>>>>>>>>> ?File >>>>>>>>>>> "/usr/local/lib/python2.5/site-packages/matplotlib/cbook.py", >>>>>>>>>>> line 17, in >>>>>>>>>>> ? ?preferredencoding = locale.getpreferredencoding() >>>>>>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 514, in >>>>>>>>>>> getpreferredencoding >>>>>>>>>>> ? ?setlocale(LC_CTYPE, "") >>>>>>>>>>> ?File "/usr/local/lib/python2.5/locale.py", line 478, in >>>>>>>>>>> setlocale >>>>>>>>>>> ? ?return _setlocale(category, locale) >>>>>>>>>>> locale.Error: unsupported locale setting >>>>>>>>>>> >>>>>>>>>>> This is the output when using ksh with the default config file >>>>>>>>>> >>>>>>>>>> That's not an ImportError. That's a locale.Error. You can see in >>>>>>>>>> the >>>>>>>>>> backtrace from matplotlib.pylab import *, and since it doesn't >>>>>>>>>> break >>>>>>>>>> there then presumably you have pylab installed. It says the >>>>>>>>>> problem: >>>>>>>>>> "unsupported locale setting". I'm no expert on locales, though. >>>>>>>>>> >>>>>>>>>> It is possible that this is a -CURRENT problem. The packages get >>>>>>>>>> rebuilt automatically and not tested. You should report this to >>>>>>>>>> the >>>>>>>>>> maintainer of py-matplotlib who is listed here: >>>>>>>>>> >>>>>>>>>> $ make search key=py-matplotlib >>>>>>>>>> Port: ? py-matplotlib-0.83.2p5 >>>>>>>>>> Path: ? graphics/py-matplotlib >>>>>>>>>> Info: ? Python charting and plotting API >>>>>>>>>> Maint: ?Damien Miller >>>>>>>>>> Index: ?graphics devel >>>>>>>>>> L-deps: iconv.>=4::converters/libiconv >>>>>>>>>> intl.>=3:gettext->=0.10.38:devel/gettext png.>=3::graphics/png >>>>>>>>>> B-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric >>>>>>>>>> :x11/py-gtk2 >>>>>>>>>> gettext->=0.10.38:devel/gettext gettext->=0.14.6:devel/gettext >>>>>>>>>> python-2.4*:lang/python/2.4 >>>>>>>>>> R-deps: :devel/py-dateutil :devel/py-tz :math/py-Numeric >>>>>>>>>> :x11/py-gtk2 >>>>>>>>>> gettext->=0.10.38:devel/gettext python-2.4*:lang/python/2.4 >>>>>>>>>> Archs: ?any >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>>> And also: >>>>>>>>>>> >>>>>>>>>>>>>> import sys >>>>>>>>>>>>>> print sys.path >>>>>>>>>>> ['', '/usr/local/lib/python25.zip', '/usr/local/lib/python2.5', >>>>>>>>>>> '/usr/local/lib/python2.5/plat-openbsd4', >>>>>>>>>>> '/usr/local/lib/python2.5/lib-tk', >>>>>>>>>>> '/usr/local/lib/python2.5/lib-dynload', >>>>>>>>>>> '/usr/local/lib/python2.5/site-packages', >>>>>>>>>>> '/usr/local/lib/python2.5/site-packages/Numeric', >>>>>>>>>>> '/usr/local/lib/python2.5/site-packages/gst-0.10', >>>>>>>>>>> '/usr/local/lib/python2.5/site-packages/gtk-2.0'] >>>>>>>>>>> >>>>>>>>>>> Do you see something? I don't... >>>>>>>>>> >>>>>>>>>> This list of directories is like your shell $PATH. It doesn't >>>>>>>>>> matter >>>>>>>>>> what the dirs themselves are, it matters what the contents of >>>>>>>>>> those >>>>>>>>>> dirs are. But, above you've shown that indeed python2.5 can >>>>>>>>>> access >>>>>>>>>> pylab so you needn't worry about digging around here. >>>>>>>>>> >>>>>>>>>>> thanks for the help >>>>>>>>>> >>>>>>>>>> Welcome :) >>>>>>>>>> >>>>>>>>>> -Nick >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Let there be peace on earth. And let it begin with misc >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Let there be peace on earth. And let it begin with misc >>>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Let there be peace on earth. And let it begin with misc >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Let there be peace on earth. And let it begin with misc >>>>> >>>> >>> >>> >>> >>> -- >>> Let there be peace on earth. And let it begin with misc >>> >> >> >> >> -- >> Let there be peace on earth. And let it begin with misc >> > From kbharatan at gmail.com Mon Mar 23 21:29:20 2009 From: kbharatan at gmail.com (K bharathan) Date: Mon, 23 Mar 2009 22:29:20 +0200 Subject: openvpn Message-ID: i've got a small network and into which road warriors have to get access to a mailserver; is there any good how tos on installing openvpn on openbsd! i've been searching the net but could not find one for my above requirement thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.theapt.org/pipermail/openbsd-newbies/attachments/20090323/d8a5fb99/attachment.html From phil.plouffe at gmail.com Tue Mar 24 15:08:36 2009 From: phil.plouffe at gmail.com (Phil) Date: Tue, 24 Mar 2009 10:08:36 -0400 Subject: openvpn In-Reply-To: References: Message-ID: <44e6cfa10903240708t572251d9s30b68a8338864108@mail.gmail.com> A while ago I bookmarked and used this link: http://www50.brinkster.com/dachee/OpenVPN.htm. link is not working anymore but this one seems to be similar: http://blog.innerewut.de/2005/7/4/openvpn-2-0-on-openbsd Good luck, Phil 2009/3/23 K bharathan > i've got a small network and into which road warriors have to get access to > a mailserver; is there any good how tos on installing openvpn on openbsd! > i've been searching the net but could not find one for my above requirement > > thanks > > > _______________________________________________ > Openbsd-newbies mailing list > Openbsd-newbies at sfobug.org > http://mailman.theapt.org/listinfo/openbsd-newbies > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mailman.theapt.org/pipermail/openbsd-newbies/attachments/20090324/3708f5bb/attachment.html