NumPy 1.10 is pretty new and not available in most distro packages, so use f2py3/f2py when it's older. Also, calling python does not guarantee the correct result because it's usually a symlink to python2 (in accordance with the PEP), so compiles still use the wrong version. With sys.executable, you'd run with exactly the same interpreter as the notebook kernel is using.
Also, I'm not really sure why it needs to be modifying sys.argv since it's Popening some other process anyway, but I didn't make any changes there as I'm not too sure about it.
NumPy 1.10 is pretty new and not available in most distro packages, so use
f2py3
/f2py
when it's older. Also, callingpython
does not guarantee the correct result because it's usually a symlink topython2
(in accordance with the PEP), so compiles still use the wrong version. Withsys.executable
, you'd run with exactly the same interpreter as the notebook kernel is using.Also, I'm not really sure why it needs to be modifying
sys.argv
since it'sPopen
ing some other process anyway, but I didn't make any changes there as I'm not too sure about it.