How do I use cx_freeze or py2exe, with xlwings, numpy

doxy

I'm using xlwings and when I want to run my freezed by cx_Freeze script I have the error below:

Traceback (most recent call last):
  File "C:\Users\D\Anaconda\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27, in <module>
    exec(code, m.__dict__)
  File "prueba.py", line 1, in <module>
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
  File "C:\Users\D\Anaconda\lib\site-packages\numpy\__init__.py", line 206, in <module>
    from . import ma
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2284, in _handle_fromlist
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 321, in _call_with_frames_removed
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
  File "C:\Users\D\Anaconda\lib\site-packages\numpy\ma\__init__.py", line 49, in <module>
    from . import extras
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2284, in _handle_fromlist
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 321, in _call_with_frames_removed
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2237, in _find_and_load
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 2226, in _find_and_load_unlocked
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1191, in _load_unlocked
  File "c:\Python\64-bit\3.4\lib\importlib\_bootstrap.py", line 1161, in _load_backward_compatible
  File "C:\Users\D\Anaconda\lib\site-packages\numpy\ma\extras.py", line 438, in <module>
    :np.apply_over_axes.__doc__.find('Notes')].rstrip() + \
AttributeError: 'NoneType' object has no attribute 'find'

My setup.py file looks like this:

from cx_Freeze import setup, Executable
build_exe_options = {'packages': ['win32com', 'xlwings'],
                     'optimize': 2}
setup(name = 'prueba',
      version = '0.1.0',
      options = {'build_exe': build_exe_options},
      executables = [Executable('prueba.py')])

I've read about the problems with numpy&cx_Frezze so I've also tried to freeze python to exe with py2exe.

And here there is another problem... When I want to run it in excel there is no response and no change.

ninMonkey

I'm able to successfully cx_freeze xlwings with the following setup.py using python3.

from cx_Freeze import setup, Executable

buildOptions = dict(packages = [], excludes = [])

base = 'Console'

executables = [
    Executable('main.py', base=base, targetName = 'main.exe')
]

setup(name='foo',
      version = '0.1',
      description = 'bar',
      options = dict(build_exe = buildOptions),
      executables = executables)

And here there is another problem... When I want to run it in excel there is no response and no change.

Do you mean the code doesn't work before freezing it?

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

how do i make a setup.py file for cx_freeze?

From Dev

KeyError: 'TCL_Library' when I use cx_Freeze

From Dev

How do I prevent multiple sessions launch for a Python program packed with py2exe?

From Dev

How to make cx_Freeze python exe windowless

From Dev

Turning a py2exe setup.py file into one using cx_freeze

From Dev

Python executable with VTK... pyinstaller, py2exe, cx_freeze etc

From Dev

How do you fix all of these py2exe problems?

From Dev

Error with cx_Freeze and xlwings as standalone version with fibonacci tutorial

From Dev

Error with cx_Freeze and xlwings as standalone version with fibonacci tutorial

From Dev

Converting .py file to exe with cx_Freeze

From Dev

How to use Pyinstaller - cx_Freeze executable sys.MEIPASS/sys.executable

From Dev

i am using cx_freeze to build a executable of py file with pyqt5. Following is the error

From Dev

How to build single .exe file with multiple files in python using cx_freeze

From Dev

How to see error messages when running an exe compiled with cx_freeze?

From Dev

how to use py2exe packing python+gevent program into .exe file?

From Dev

CX_Freeze: Python.exe not responding

From Dev

Python to exe using cx_Freeze

From Dev

CX_Freeze: Python.exe not responding

From Dev

Python to exe using cx_Freeze

From Dev

How do I call an Excel macro from Python using xlwings?

From Dev

cx_freeze - how debug app

From Dev

How include modules - cx_Freeze

From Dev

how to use py2exe when rewriting an imported module (and using the rewritten version)

From Dev

Error when Converting .py to .exe with cx_freeze

From Dev

What does the description option in a cx_Freeze setup script do?

From Dev

Getting import error when I try to compile with cx_freeze

From Dev

cx_freeze error when I try to include images

From Dev

Hi, I have with problems with cx_freeze and tkinter

From Dev

creating .exe file with cx_freeze for a tkinter interface

Related Related

  1. 1

    how do i make a setup.py file for cx_freeze?

  2. 2

    KeyError: 'TCL_Library' when I use cx_Freeze

  3. 3

    How do I prevent multiple sessions launch for a Python program packed with py2exe?

  4. 4

    How to make cx_Freeze python exe windowless

  5. 5

    Turning a py2exe setup.py file into one using cx_freeze

  6. 6

    Python executable with VTK... pyinstaller, py2exe, cx_freeze etc

  7. 7

    How do you fix all of these py2exe problems?

  8. 8

    Error with cx_Freeze and xlwings as standalone version with fibonacci tutorial

  9. 9

    Error with cx_Freeze and xlwings as standalone version with fibonacci tutorial

  10. 10

    Converting .py file to exe with cx_Freeze

  11. 11

    How to use Pyinstaller - cx_Freeze executable sys.MEIPASS/sys.executable

  12. 12

    i am using cx_freeze to build a executable of py file with pyqt5. Following is the error

  13. 13

    How to build single .exe file with multiple files in python using cx_freeze

  14. 14

    How to see error messages when running an exe compiled with cx_freeze?

  15. 15

    how to use py2exe packing python+gevent program into .exe file?

  16. 16

    CX_Freeze: Python.exe not responding

  17. 17

    Python to exe using cx_Freeze

  18. 18

    CX_Freeze: Python.exe not responding

  19. 19

    Python to exe using cx_Freeze

  20. 20

    How do I call an Excel macro from Python using xlwings?

  21. 21

    cx_freeze - how debug app

  22. 22

    How include modules - cx_Freeze

  23. 23

    how to use py2exe when rewriting an imported module (and using the rewritten version)

  24. 24

    Error when Converting .py to .exe with cx_freeze

  25. 25

    What does the description option in a cx_Freeze setup script do?

  26. 26

    Getting import error when I try to compile with cx_freeze

  27. 27

    cx_freeze error when I try to include images

  28. 28

    Hi, I have with problems with cx_freeze and tkinter

  29. 29

    creating .exe file with cx_freeze for a tkinter interface

HotTag

Archive