windows 7 - Python crash with minimal Cython module (Python3, Anaconda3, Windows7) -



windows 7 - Python crash with minimal Cython module (Python3, Anaconda3, Windows7) -

i seek utilize cython python3 (anaconda3) under windows 7. after having solved bug in distutils editing file cygwinccompiler.py (cf. building minimal cython file python 3.3 (anaconda) under windows 7), modules can built without problems:

c:\path\testcython> python setup.py build running build running build_ext cythoning testcython.pyx testcython.c building 'testcython' extension c:\prog\anaconda3\scripts\gcc.bat -mdll -o -wall -ic:\prog\anaconda3\include -ic :\prog\anaconda3\include -c testcython.c -o build\temp.win-amd64-3.4\release\tes tcython.o writing build\temp.win-amd64-3.4\release\testcython.def c:\prog\anaconda3\scripts\gcc.bat -shared -s build\temp.win-amd64-3.4\release\te stcython.o build\temp.win-amd64-3.4\release\testcython.def -lc:\prog\anaconda3\l ibs -lc:\prog\anaconda3\pcbuild\amd64 -lpython34 -lmsvcr100 -o build\lib.win-amd 64-3.4\testcython.pyd

however, there import or print statement in .pyx file, produced .pyd file makes python crash. example, if testcython.pyx contains

def say_hello_to(name): print('hello '+name)

it gives

in [1]: import testcython # no crash here in [2]: testcython.say_hello_to('tom') hello tom

here "python.exe has stopped working" window pops , it's finished.

in kind of situation (crash without error log, segmentation fault suppose), can understand problem?

does understand happens here cython, python 3 (anaconda3) under windows?

ps: no problem python 2.7 (anaconda).

edit: traceback produced module faulthandler

if testcython.pyx contains:

print('test print... crash?')

or

import mod # mod.py empty module in working directory

or

import sys

python crashes , get:

$ python -x faulthandler -c 'import testcython' test print... crash? fatal python error: segmentation fault current thread 0x000013e0 (most recent phone call first): file "<frozen importlib._bootstrap>", line 321 in _call_with_frames_removed file "<frozen importlib._bootstrap>", line 1715 in load_module file "<frozen importlib._bootstrap>", line 539 in _check_name_wrapper file "<frozen importlib._bootstrap>", line 1161 in _load_backward_compatible file "<frozen importlib._bootstrap>", line 1191 in _load_unlocked file "<frozen importlib._bootstrap>", line 2226 in _find_and_load_unlocked file "<frozen importlib._bootstrap>", line 2237 in _find_and_load file "<string>", line 1 in <module>

it seems build failing link appropriate libraries , print (write terminal) causing seg-faults.

let's go build process. can utilize pip instead of setup.py build?

can work under linux :)

python-3.x windows-7 cython anaconda

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -