cx-freeze can't find python-matplotlib-data

Bug #898119 reported by Usamm
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
cx-freeze (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

cx-freeze doesn't work when it tries to package something using matplotlib.

$ echo "import pylab" > test.py
$ cxfreeze test.py

[....]

copying /usr/lib/pymodules/python2.7/matplotlib/mpl-data -> /home/user/dist/mpl-data
Traceback (most recent call last):
  File "/usr/bin/cxfreeze", line 5, in <module>
    main()
  File "/usr/lib/pymodules/python2.7/cx_Freeze/main.py", line 170, in main
    freezer.Freeze()
  File "/usr/lib/pymodules/python2.7/cx_Freeze/freezer.py", line 428, in Freeze
    copyDependentFiles = False)
  File "/usr/lib/pymodules/python2.7/cx_Freeze/freezer.py", line 127, in _CopyFile
    shutil.copyfile(source, target)
  File "/usr/lib/python2.7/shutil.py", line 81, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/usr/lib/pymodules/python2.7/matplotlib/mpl-data'

The correct path for mpl-data is instead /usr/share/matplotlib/mpl-data.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: cx-freeze 4.0.1-0ubuntu4
ProcVersionSignature: Ubuntu 3.0.0-14.23-generic 3.0.9
Uname: Linux 3.0.0-14-generic i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Wed Nov 30 06:49:24 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110426)
SourcePackage: cx-freeze
UpgradeStatus: Upgraded to oneiric on 2011-10-15 (45 days ago)

Revision history for this message
Usamm (usamm) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cx-freeze (Ubuntu):
status: New → Confirmed
Revision history for this message
Julian Taylor (jtaylor) wrote :

it should probably use matplotlib.get_data_path() in cx_Freeze/hhooks.py

Revision history for this message
cserpell (cristian-v) wrote :

Hi, I did a hack so I can use cx Freeze locally, adding the path directly in hooks.py file. I know it is a hack but it works for me. Is there any intention to fix this bug in a more general way?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.