You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Testing Python executable: python2
Testing Python executable: python3
Testing Python executable: python2
Traceback (most recent call last):
File "tests/tnimfrompy.py", line 128, in <module>
s.testPyFromNim()
nimpy.Exception: Unexpected error encountered: <type 'exceptions.ImportError'>:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: cannot import name multiarray
stack trace: (most recent call last)
/private/var/folders/ll/dtd6ksrn50n3xkdy4y61tf_80000gn/T/nimblecache/nimscriptapi.nim(165, 16)
/Users/timothee/git_clone/nim/nimpy/nimpy_43710.nims(88, 11) testTask
/Users/timothee/git_clone/nim/nimpy/nimpy_43710.nims(78, 14) runTests
/Users/timothee/git_clone/nim/Nim_devel/lib/system/nimscript.nim(260, 7) exec
/Users/timothee/git_clone/nim/Nim_devel/lib/system/nimscript.nim(260, 7) Error: unhandled exception: FAILED: python2 tests/tnimfrompy.py [OSError]
??? compiler msg initiated here [MsgOrigin]
Tip: 1 messages have been suppressed, use --verbose to show them.
Error: Exception raised during nimble script execution
note
also fails with similar error with:NIMPY_PY_EXES=python3 nimble test
adding
# in nimpy/tests/tpyfromnim.nimimport timn/nimpy_utils
initNimpy()
with:
# in timn/nimpy_utilsprocinitNimpy*() =var isInit{.threadvar.}: boolifnot isInit:
# defined via https://github.com/yglukhov/nimpy/issues/171let libpython =findLibpython("python3")
# dbg libpythonpyInitLibPath(libpython)
isInit =true
and then NIMPY_PY_EXES=python3 nimble test
makes it work
so we really need to add auto-discovery (calling pyInitLibPath), ie address #171
note 2
NIMPY_PY_EXES=python2 nimble test (or nimble test) still don't work, for other reasons:
Testing Python executable: python2
Testing Python executable: python2
Traceback (most recent call last):
File "tests/tnimfrompy.py", line 2, in <module>
import nimfrompy as s
TypeError: PyModule_AddObject() needs module as first arg
but that's a lesser problem given deprecation of python2
note 3
after that, CI should add OSX (currenly it's linux only AFAIK)
The text was updated successfully, but these errors were encountered:
timotheecour
changed the title
nimble test fails: Importing the multiarray numpy extension module failed. Mostnimble test fails: Importing the multiarray numpy extension module failed; caused by missing pyInitLibPathOct 20, 2020
timotheecour
changed the title
nimble test fails: Importing the multiarray numpy extension module failed; caused by missing pyInitLibPath
OSX: nimble test fails: Importing the multiarray numpy extension module failed; caused by missing pyInitLibPathOct 20, 2020
I'm on OSX.
note
NIMPY_PY_EXES=python3 nimble test
with:
and then
NIMPY_PY_EXES=python3 nimble test
makes it work
so we really need to add auto-discovery (calling
pyInitLibPath
), ie address #171note 2
NIMPY_PY_EXES=python2 nimble test
(ornimble test
) still don't work, for other reasons:but that's a lesser problem given deprecation of python2
note 3
after that, CI should add OSX (currenly it's linux only AFAIK)
The text was updated successfully, but these errors were encountered: