Closed farazmoradi closed 1 year ago
Could this help?: https://github.com/mariomulansky/PySpike/issues/42
This appears to be due to a known incompatibility between numpy and cython versions. See numpy issue #17937 on github. You should not see it using the latest versions of numpy and cython. But, if you do, please report that with the numpy and cython versions.
Issue should be resolved (see latest comment by Ed).
pip install pyspike (Mouse) farazmoradi@farazs-MacBook-Pro Mouse % pip install pyspike Collecting pyspike Using cached pyspike-0.6.0.tar.gz (1.5 MB) Requirement already satisfied: numpy in /Users/farazmoradi/.conda/envs/Mouse/lib/python3.9/site-packages (from pyspike) (1.20.2) Building wheels for collected packages: pyspike Building wheel for pyspike (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/farazmoradi/.conda/envs/Mouse/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/1t/1c7wwn1d66s27vn36sdky3lm0000gn/T/pip-install-xsterkuo/pyspike_799559b016c94faa85778bfccc27efed/setup.py'"'"'; file='"'"'/private/var/folders/1t/1c7wwn1d66s27vn36sdky3lm0000gn/T/pip-install-xsterkuo/pyspike_799559b016c94faa85778bfccc27efed/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/1t/1c7wwn1d66s27vn36sdky3lm0000gn/T/pip-wheel-r9c4wsku cwd: /private/var/folders/1t/1c7wwn1d66s27vn36sdky3lm0000gn/T/pip-install-xsterkuo/pyspike_799559b016c94faa85778bfccc27efed/ Complete output (346 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.9 creating build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/spike_distance.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/DiscreteFunc.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/spikes.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/PieceWiseConstFunc.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/generic.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/init.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/PieceWiseLinFunc.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/psth.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/spike_directionality.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/spike_sync.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/SpikeTrain.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike copying pyspike/isi_distance.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike creating build/lib.macosx-10.9-x86_64-3.9/pyspike/cython copying pyspike/cython/init.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike/cython copying pyspike/cython/python_backend.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike/cython copying pyspike/cython/directionality_python_backend.py -> build/lib.macosx-10.9-x86_64-3.9/pyspike/cython copying pyspike/cython/cython_add.c -> build/lib.macosx-10.9-x86_64-3.9/pyspike/cython copying pyspike/cython/cython_profiles.c -> build/lib.macosx-10.9-x86_64-3.9/pyspike/cython copying pyspike/cython/cython_distances.c -> build/lib.macosx-10.9-x86_64-3.9/pyspike/cython copying pyspike/cython/cython_directionality.c -> build/lib.macosx-10.9-x86_64-3.9/pyspike/cython copying pyspike/cython/cython_simulated_annealing.c -> build/lib.macosx-10.9-x86_64-3.9/pyspike/cython running build_ext skipping 'pyspike/cython/cython_add.c' Cython extension (up-to-date) skipping 'pyspike/cython/cython_profiles.c' Cython extension (up-to-date) skipping 'pyspike/cython/cython_distances.c' Cython extension (up-to-date) skipping 'pyspike/cython/cython_directionality.c' Cython extension (up-to-date) skipping 'pyspike/cython/cython_simulated_annealing.c' Cython extension (up-to-date) building 'pyspike.cython.cython_add' extension creating build/temp.macosx-10.9-x86_64-3.9 creating build/temp.macosx-10.9-x86_64-3.9/pyspike creating build/temp.macosx-10.9-x86_64-3.9/pyspike/cython clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/farazmoradi/.conda/envs/Mouse/include -arch x86_64 -fPIC -O2 -isystem /Users/farazmoradi/.conda/envs/Mouse/include -arch x86_64 -I/Users/farazmoradi/.conda/envs/Mouse/lib/python3.9/site-packages/numpy/core/include -I/Users/farazmoradi/.conda/envs/Mouse/include/python3.9 -c pyspike/cython/cython_add.c -o build/temp.macosx-10.9-x86_64-3.9/pyspike/cython/cython_add.o In file included from pyspike/cython/cython_add.c:242: In file included from /Users/farazmoradi/.conda/envs/Mouse/lib/python3.9/site-packages/numpy/core/include/numpy/arrayobject.h:4: In file included from /Users/farazmoradi/.conda/envs/Mouse/lib/python3.9/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /Users/farazmoradi/.conda/envs/Mouse/lib/python3.9/site-packages/numpy/core/include/numpy/ndarraytypes.h:1944: /Users/farazmoradi/.conda/envs/Mouse/lib/python3.9/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
warning "Using deprecated NumPy API, disable it with " \
^ pyspike/cython/cython_add.c:6719:134: warning: code will never be executed [-Wunreachable-code] pyx_t_3 = PyTuple_GET_ITEM(pyx_t_1, pyx_t_2); Pyx_INCREF(pyx_t_3); pyx_t_2++; if (unlikely(0 < 0)) {pyx_filename = __pyx_f[1]; pyx_lineno = 794; pyx_clineno = LINE; goto __pyx_L1_error;} ^
~~ pyspike/cython/cython_add.c:7941:134: warning: code will never be executed [-Wunreachable-code] pyx_t_3 = PyTuple_GET_ITEM(pyx_t_5, pyx_t_1); Pyx_INCREF(pyx_t_3); pyx_t_1++; if (unlikely(0 < 0)) {__pyx_filename = pyx_f[2]; pyx_lineno = 147; __pyx_clineno = LINE; goto pyx_L1_error;} ^~~ pyspike/cython/cython_add.c:9918:138: warning: code will never be executed [-Wunreachable-code] pyx_t_5 = PyTuple_GET_ITEM(pyx_t_2, pyx_t_3); Pyx_INCREF(pyx_t_5); pyx_t_3++; if (unlikely(0 < 0)) {pyx_filename = __pyx_f[2]; pyx_lineno = 352; pyx_clineno = LINE; goto __pyx_L1_error;} ^~~ pyspike/cython/cython_add.c:9910:137: warning: code will never be executed [-Wunreachable-code] pyx_t_5 = PyList_GET_ITEM(pyx_t_2, pyx_t_3); Pyx_INCREF(pyx_t_5); pyx_t_3++; if (unlikely(0 < 0)) {__pyx_filename = pyx_f[2]; pyx_lineno = 352; __pyx_clineno = LINE; goto pyx_L1_error;} ^~~ pyspike/cython/cython_add.c:13451:138: warning: code will never be executed [-Wunreachable-code] pyx_t_7 = PyTuple_GET_ITEM(pyx_t_4, pyx_t_5); Pyx_INCREF(pyx_t_7); pyx_t_5++; if (unlikely(0 < 0)) {pyx_filename = __pyx_f[2]; pyx_lineno = 637; pyx_clineno = LINE; goto __pyx_L1_error;} ^~~ pyspike/cython/cython_add.c:13443:137: warning: code will never be executed [-Wunreachable-code] pyx_t_7 = PyList_GET_ITEM(pyx_t_4, pyx_t_5); Pyx_INCREF(pyx_t_7); pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = pyx_f[2]; pyx_lineno = 637; __pyx_clineno = LINE; goto pyx_L1_error;} ^~~ pyspike/cython/cython_add.c:14068:138: warning: code will never be executed [-Wunreachable-code] pyx_t_9 = PyTuple_GET_ITEM(pyx_t_3, pyx_t_7); Pyx_INCREF(pyx_t_9); pyx_t_7++; if (unlikely(0 < 0)) {pyx_filename = __pyx_f[2]; pyx_lineno = 704; pyx_clineno = LINE; goto __pyx_L1_error;} ^~~ pyspike/cython/cython_add.c:14060:137: warning: code will never be executed [-Wunreachable-code] pyx_t_9 = PyList_GET_ITEM(pyx_t_3, pyx_t_7); Pyx_INCREF(pyx_t_9); pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = pyx_f[2]; pyx_lineno = 704; __pyx_clineno = LINE; goto pyx_L1_error;} ^~~ pyspike/cython/cython_add.c:20325:26: error: no member named 'tp_print' in 'struct _typeobject' pyxtypepyx_array.tp_print = 0;