树莓派使用pip安装cython
百度到的安装方法:
pi@raspberrypi:~ $ pip3 install Cython
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting Cython
Downloading https://files.pythonhosted.org/packages/1e/2a/fcb9cf3620a758bc7a1bd4a02eb00722661a658bf9de053894c4dc77596c/Cython-0.29.20-py2.py3-none-any.whl (973kB)
100% |████████████████████████████████| 983kB 14kB/s
Installing collected packages: Cython
The scripts cygdb, cython and cythonize are installed in '/home/pi/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
查看版本,发现:
pi@raspberrypi:~ $ cython --version
bash: cython:未找到命令
于是:
pi@raspberrypi:~ $ pip3 uninstall Cython
再:
pi@raspberrypi:~ $ sudo pip3 install cython
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting cython
Downloading https://files.pythonhosted.org/packages/1e/2a/fcb9cf3620a758bc7a1bd4a02eb00722661a658bf9de053894c4dc77596c/Cython-0.29.20-py2.py3-none-any.whl (973kB)
100% |████████████████████████████████| 983kB 24kB/s
Installing collected packages: cython
Successfully installed cython-0.29.20
查看版本验证:
pi@raspberrypi:~ $ cython -V
Cython version 0.29.20
成功!