New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.0 fails to start with Python 3.5 on Windows #533

Closed
aberres opened this Issue Aug 3, 2016 · 13 comments

Comments

Projects
None yet
3 participants
@aberres

aberres commented Aug 3, 2016

With vanilla python as well as with WinPython 3.5 I a m running into an input error complaining about missing _ctypes_test.
0.7.2 on Windows as well as 0.9.0 on Mac are working fine.

Traceback (most recent call last):
  File "c:\users\b\local\p3\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\users\b\local\p3\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\b\local\p3\Scripts\xlwings.exe\__main__.py", line 5, in <module>
  File "c:\users\b\local\p3\lib\site-packages\xlwings\__init__.py", line 38, in <module>
    from .udfs import xlfunc as func, xlsub as sub, xlret as ret, xlarg as arg, get_udf_module, import_udfs
  File "c:\users\b\local\p3\lib\site-packages\xlwings\udfs.py", line 6, in <module>
    from _ctypes_test import func
ImportError: No module named '_ctypes_test'

@fzumstein fzumstein added the bug label Aug 3, 2016

@fzumstein fzumstein added this to the v0.9.1 milestone Aug 3, 2016

@aberres aberres changed the title from 0.9.0 fails to start with Python 3.5 to 0.9.0 fails to start with Python 3.5 on Windows Aug 3, 2016

@fzumstein fzumstein closed this in 8abbe84 Aug 5, 2016

@stonebig

This comment has been minimized.

stonebig commented Mar 25, 2017

stupid question: how does excel find winpython (or the winpython we want it to use) ?

@stonebig

This comment has been minimized.

stonebig commented Mar 25, 2017

ok, found.

@fzumstein

This comment has been minimized.

Member

fzumstein commented Mar 25, 2017

By default it starts python by executing python from the command line, i.e. this works if you have a default python installation on your PATH. Since WinPython doesn't add the location to the PATH, you need to change PYTHON_WIN to the path where WinPython resides, see: http://docs.xlwings.org/en/stable/vba.html#settings This currently is in the VBA module.

Note that we're working on turning the VBA module into an addin that stores the settings in an external settings file, so you should in theory be able to automatically change the path in the settings upon installation of WinPython.

@stonebig

This comment has been minimized.

stonebig commented Mar 25, 2017

So there's no dependancy, and it can ship on winpythonzero ?

@stonebig

This comment has been minimized.

stonebig commented Mar 25, 2017

what about the nightmare Excel 32 bit on a windows 64 ? no issue ? which Python would work for that ? only the 32 bit ?

@fzumstein

This comment has been minimized.

Member

fzumstein commented Mar 25, 2017

the only dependency that xlwings has on windows that is not automatically installed when doing pip install xlwings is pywin32, but as I recall this is part of WinPython so you should have no problems.
xlwings works with all combinations of Windows/Excel/Python bitness, since its running out of process.

@stonebig

This comment has been minimized.

stonebig commented Mar 25, 2017

argh, pywin32 is 8Mo big

@fzumstein

This comment has been minimized.

Member

fzumstein commented Mar 25, 2017

not sure if I follow, according to this list, pywin32 is already included: https://github.com/winpython/winpython/blob/master/changelogs/WinPythonQt5-3.4.4.6.md

@stonebig

This comment has been minimized.

stonebig commented Mar 25, 2017

yes, but not in the small winpythonzero. So far, I used pythonnet as a smaller alternative to pywin32.

@stonebig

This comment has been minimized.

stonebig commented Mar 25, 2017

could we use xlwings with all the (specific to the sheet) python code only present in the excel sheet ?

(the way to do it doesn't need to be pretty, for example, the script could be in an excel cell)

... a bit like Jupyter-notebook programming

@fzumstein

This comment has been minimized.

Member

fzumstein commented Mar 25, 2017

It has been discussed before, but it's not a priority for us: #107

@stonebig

This comment has been minimized.

stonebig commented Mar 25, 2017

ok.

@stonebig

This comment has been minimized.

stonebig commented Mar 26, 2017

Could it be an optional "add-in" ? the current "xlwing" as-a-module is nice to my taste, I would like it to remain possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment