Ticket #1 (accepted defect)
Opened 3 years ago
Last modified 8 months ago
Importing the pylab module from matplotlib fails
| Reported by: | Eleanor (via google group) | Owned by: | p.zivkovic |
|---|---|---|---|
| Priority: | major | Milestone: | Portable Python 2.7.2.1 |
| Component: | libraries | Version: | 2.7 |
| Severity: | high | Keywords: | matplotlib |
| Cc: |
Description (last modified by p.zivkovic) (diff)
>>> import pylab
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "E:\PortablePython_1.1_py2.5.4\App\lib\site-packages\pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "E:\PortablePython_1.1_py2.5.4\App\lib\site-packages\matplotlib \pylab.py", line 206, in <module>
from matplotlib import mpl # pulls in most modules
File "E:\PortablePython_1.1_py2.5.4\App\lib\site-packages\matplotlib \mpl.py", line 2, in <module>
from matplotlib import axis
File "E:\PortablePython_1.1_py2.5.4\App\lib\site-packages\matplotlib \axis.py", line 9, in <module>
import matplotlib.font_manager as font_manager
File "E:\PortablePython_1.1_py2.5.4\App\lib\site-packages\matplotlib \font_manager.py", line 1302, in <module>
_rebuild()
File "E:\PortablePython_1.1_py2.5.4\App\lib\site-packages\matplotlib \font_manager.py", line 1294, in _rebuild
pickle_dump(fontManager, _fmcache)
File "E:\PortablePython_1.1_py2.5.4\App\lib\site-packages\matplotlib \font_manager.py", line 939, in pickle_dump
pickle.dump(data, fh)
IOError: [Errno 2] No such file or directory
It seems the font_maanger module needs to read/write files to the directory returned by
>>> matplotlib.get_configdir()
'H:\\.matplotlib'
which dosen't exist in a portable install.
The location of this directory can be changed with the MPLCONFIGDIR environment variable in a fixed install.
http://groups.google.com/group/portablepython/browse_frm/thread/3c955ef49ab864a9
Change History
Note: See
TracTickets for help on using
tickets.

