import pylab partition problem

I have an interesting problem importing pylab. Most of my

    > work is stored on a FAT32 partition so I can access it from
    > windows or linux. If I run python from a dos command open
    > on that partition I get:

    > E:\pythonscripts>python Enthought Edition build 1069 Python
    > 2.3.5 (#62, Mar 22 2005, 21:53:13) [MSC v.1200 32 bit
    > (Intel)] on win32 Type "help", "copyright", "credits" or
    > "license" for more information.
    >>>> import pylab
    > Traceback (most recent call last): File "<stdin>", line 1,
    > in ? File "C:\Python23\Lib\site-packages\pylab.py", line 1,
    > in ? from matplotlib.pylab import * File
    > "C:\Python23\Lib\site-packages\matplotlib\pylab.py", line
    > 199, in ? import backends File
    > "C:\Python23\Lib\site-packages\matplotlib\backends\__init__.py",
    > line 15, in ? raise ValueError, 'Unrecognized backend %s' %
    > backend ValueError: Unrecognized backend WxAgg

My guess is that this has nothing to do with partitions and that you
may be reading two different rc files. One has

  backend : WxAgg

which is erroneous (should be WXAgg)

and the other has the win32 default

  backend : TkAgg

which is working for you.

To test, create a script test.py

  import pylab

and run it on both partitions with

  python test.py --verbose-helpful

This will tell you which rc file is being loaded, what backend is
chosen, etc.

Don't I feel silly. --verbose-helpful is quite helpful. I was loading an rc file I didn't know I had saved in the directory where another test script was saved. I deleted that other rc file with the bad backend string and everything is fine.

Ryan

John Hunter wrote:

···

"Ryan" == Ryan Krauss <ryanfedora@...614...> writes:

    > I have an interesting problem importing pylab. Most of my
    > work is stored on a FAT32 partition so I can access it from
    > windows or linux. If I run python from a dos command open
    > on that partition I get:

    > E:\pythonscripts>python Enthought Edition build 1069 Python
    > 2.3.5 (#62, Mar 22 2005, 21:53:13) [MSC v.1200 32 bit
    > (Intel)] on win32 Type "help", "copyright", "credits" or
    > "license" for more information.
    >>>> import pylab
    > Traceback (most recent call last): File "<stdin>", line 1,
    > in ? File "C:\Python23\Lib\site-packages\pylab.py", line 1,
    > in ? from matplotlib.pylab import * File
    > "C:\Python23\Lib\site-packages\matplotlib\pylab.py", line
    > 199, in ? import backends File
    > "C:\Python23\Lib\site-packages\matplotlib\backends\__init__.py",
    > line 15, in ? raise ValueError, 'Unrecognized backend %s' %
    > backend ValueError: Unrecognized backend WxAgg

My guess is that this has nothing to do with partitions and that you
may be reading two different rc files. One has

  backend : WxAgg

which is erroneous (should be WXAgg)

and the other has the win32 default

  backend : TkAgg

which is working for you.

To test, create a script test.py

  import pylab

and run it on both partitions with

  python test.py --verbose-helpful

This will tell you which rc file is being loaded, what backend is
chosen, etc.

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * TechWell - Software Conferences, Training, & Resources
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options