10
Durante l'utilizzo di cython
in un notebook ipython, vedo l'errore di seguito. Cosa c'è che non va?Cython in Ipython: ERRORE: cell magic `%% cython` non trovato
%load_ext cythonmagic
/usr/local/lib/python2.7/dist-packages/IPython/extensions/cythonmagic.py:21: UserWarning: The Cython magic has been moved to the Cython package
warnings.warn("""The Cython magic has been moved to the Cython package""")
%%cython
def fib(int n):
cdef int a,b,i
for i in range(n):
a,b=a+b,b
return a
ERROR: Cell magic `%%cython` not found.
Se si installa ipython con pip (vale a dire senza utilizzare strumenti di distribuzione come Anaconda ecc.), È necessario installare il modulo Cython su python o virtualenv prima: 'pip install Cython' – xflin