matplotlib 1.5.1 doesn't package

Issue #183 resolved
Ian Bell
created an issue

I tried to package this simple test.cpp:

import matplotlib.pyplot as plt

with this

import sys
from cx_Freeze import setup, Executable

# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os","matplotlib"], "excludes": ["tkinter"]}

# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
    base = "Win32GUI"

setup(  name = "test",
        version = "0.1",
        description = "My GUI application!",
        options = {"build_exe": build_exe_options},
        executables = [Executable("", base=base)])

and then when I do python build, I get:

Traceback (most recent call last):
  File "", line 17, in <module>
    executables = [Executable("", base=base)])
  File "C:\Miniconda\lib\site-packages\cx_freeze-5.0-py2.7-win-amd64.egg\cx_Freeze\", line 337, in setup
  File "C:\Miniconda\lib\distutils\", line 151, in setup
  File "C:\Miniconda\lib\distutils\", line 953, in run_commands
  File "C:\Miniconda\lib\distutils\", line 972, in run_command
  File "C:\Miniconda\lib\distutils\command\", line 127, in run
  File "C:\Miniconda\lib\distutils\", line 326, in run_command
  File "C:\Miniconda\lib\distutils\", line 972, in run_command
  File "C:\Miniconda\lib\site-packages\cx_freeze-5.0-py2.7-win-amd64.egg\cx_Freeze\", line 207, in run
  File "C:\Miniconda\lib\site-packages\cx_freeze-5.0-py2.7-win-amd64.egg\cx_Freeze\", line 551, in Freeze
    self._WriteModules(fileName, self.finder)
  File "C:\Miniconda\lib\site-packages\cx_freeze-5.0-py2.7-win-amd64.egg\cx_Freeze\", line 455, in _WriteModules
  File "C:\Miniconda\lib\site-packages\cx_freeze-5.0-py2.7-win-amd64.egg\cx_Freeze\", line 652, in Create
cx_Freeze.freezer.ConfigError: no file named sys (for module collections.sys)

Comments (2)

  1. Franco C

    same problem on OSX 10.11, using this commit ).

    Was a solution ever found?

    line 24, in <module>
        from matplotlib.pylab import *
      File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
      File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 1191, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 1161, in _load_backward_compatible
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/matplotlib/", line 1132, in <module>
        rcParams = rc_params()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/matplotlib/", line 965, in rc_params
        fname = matplotlib_fname()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/matplotlib/", line 815, in matplotlib_fname
        path = get_data_path()  # guaranteed to exist or raise
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/matplotlib/", line 320, in wrapper
        ret = func(*args, **kwargs)
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/matplotlib/", line 718, in _get_data_path_cached
        defaultParams['datapath'][0] = _get_data_path()
      File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/matplotlib/", line 713, in _get_data_path
        raise RuntimeError('Could not find the matplotlib data files')
    RuntimeError: Could not find the matplotlib data files
  2. Log in to comment