Thanks to visit codestin.com
Credit goes to github.com

Skip to content

numba does not work in 3.4.4.2 #315

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

Closed
nepix32 opened this issue Apr 21, 2016 · 8 comments
Closed

numba does not work in 3.4.4.2 #315

nepix32 opened this issue Apr 21, 2016 · 8 comments

Comments

@nepix32
Copy link

nepix32 commented Apr 21, 2016

Tried the following directly after downloading WinPython-32bit-3.4.4.2Qt5 on a machine running Win7 Enterprise SP1 64 bit/8GB:

  • Double-click "WinPython Command Prompt.exe" in the installation dir
  • on prompt, cd ..
  • enter python -c "import numba"

This throws the following exception:

Traceback (most recent call last):
  File "C:\Users\XXX\Documents\zipp\winpython\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\lib\site-packages\llvmlite\binding\ffi.py", line 40, in <module>
    lib = ctypes.CDLL(os.path.join(_lib_dir, _lib_name))
  File "C:\Users\XXX\Documents\zipp\winpython\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\lib\ctypes\__init__.py", line 351, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\XXX\Documents\zipp\winpython\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\lib\site-packages\numba\__init__.py", line 9, in <module>
    from . import runtests, decorators
  File "C:\Users\XXX\Documents\zipp\winpython\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\lib\site-packages\numba\decorators.py", line 8, in <module>
    from . import config, sigutils
  File "C:\Users\XXX\Documents\zipp\winpython\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\lib\site-packages\numba\config.py", line 10, in <module>
    import llvmlite.binding as ll
  File "C:\Users\XXX\Documents\zipp\winpython\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\lib\site-packages\llvmlite\binding\__init__.py", line 6, in <module>
    from .dylib import *
  File "C:\Users\XXX\Documents\zipp\winpython\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\lib\site-packages\llvmlite\binding\dylib.py", line 4, in <module>
    from . import ffi
  File "C:\Users\XXX\Documents\zipp\winpython\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\lib\site-packages\llvmlite\binding\ffi.py", line 45, in <module>
    lib = ctypes.CDLL(_lib_name)
  File "C:\Users\XXX\Documents\zipp\winpython\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\lib\ctypes\__init__.py", line 351, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found

As I understand it, self._name is llvmlite.dll. Changing into Lib\site-packages\llvmlite\binding where llvmlite.dll lives gives the same error.

As the same also happens on a Windows 8.1 machine, I suppose I am not the only one with this issue.

Otherwise (e. g. jupyter) or Qt5 apps work as expected.

@stonebig
Copy link
Contributor

stonebig commented Apr 21, 2016

python.exe -c "import numba"

it's due to script\python.bat and python.exe interfering.
python.bat is currently calling ptpython when it seees it, which has not the same syntax.

it's a bit wired.

You may do pip uninstall ptpython if you feel annoyed

@stonebig
Copy link
Contributor

You're right the python.bat script should not call ptpython. It's a design error of WinPython.

The two solutions for now are to specify 'python.exe' or to remove 'ptpython' package.

@stonebig stonebig added this to the 2016-03 Matplotlib 2.0 / PyQt5.6 / mingwpy update ... milestone Apr 21, 2016
@stonebig stonebig added the bug label Apr 21, 2016
@stonebig
Copy link
Contributor

you may also copy the current 'python.bat' as 'winpython.bat', and keep 'python.bat' calling only python:

@echo off
call "%~dp0env_for_icons.bat"
cd/D "%WINPYWORKDIR%"
rem backward compatibility for python.exe
"%WINPYDIR%\python.exe"  %*

@nepix32
Copy link
Author

nepix32 commented Apr 22, 2016

@stonebig Tried what you suggested (first the changed bat file, then uninstalling ptpython). Does not change the fact that a script containing import numba will give the traceback above (I put the command line example in as a minimum self contained example).

@stonebig
Copy link
Contributor

Yes, you made me discover an issue, but your error message is something else, if still present: it works on my pc.
an orphan issue

@nepix32
Copy link
Author

nepix32 commented Apr 22, 2016

Ok, at least the llvmlite issue is solved now. I suppose it works on the system of @stonebig because he should have Visual Studio 2015 installed. When following the advise from @cgohlke on his package page (and the advise from #235 ) after installing vc_redist.x86.exe (the VC 2015 flavor), the error goes away.

When trying to let something compile (for example numba pycc) it throws:

distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat

Which makes me wonder if this is supposed to work with mingw32 included in winpython (there is no VS 2015 on my machine).

From my side this issue can be closed.

@stonebig
Copy link
Contributor

good remark: starting WinPython 2016-02, you need vc_redist.x86.exe, as numba needs it.

We couldn't stay on old numba forever, and the other issue I found made me forgot about it.

I did put a (*) with a footnote on the winpython.github.io page, but it may be not clear enough.

@stonebig
Copy link
Contributor

stonebig commented Apr 22, 2016

for vcvarsall problem on "numba pycc":

  • numba needs vc_redist.x86.exe to work,
  • so we must suppose that ahead of time compilation toolchain of numba wants to use VC 2015 too.
    ==> It's more a request for numba team to be compatible with mingwpy.

mingwpy is critical for Scientific Python eco-system development on Windows.
(we may hope a better support from Anaconda when mingwpy will become compatible with Python3.5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants