jetson nano上でpandasのバージョンアップを試みるもエラー
jetpack4.4.1 pandasのデフォルトバージョンは以下だった
$ python3 -c "import pandas as pd ;print(pd.__version__);"
0.22.0
以下の通りバージョンアップを試みるもエラー
$ pip3 install -U pandas
Collecting pandas
Downloading https://files.pythonhosted.org/packages/09/39/fb93ed98962d032963418cd1ea5927b9e11c4c80cb1e0b45dea769d8f9a5/pandas-1.1.4.tar.gz (5.2MB)
100% |████████████████████████████████| 5.2MB 76kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-x6hm0bxt/pandas/setup.py", line 792, in <module>
setup_package()
File "/tmp/pip-build-x6hm0bxt/pandas/setup.py", line 762, in setup_package
ext_modules=maybe_cythonize(extensions, compiler_directives=directives),
File "/tmp/pip-build-x6hm0bxt/pandas/setup.py", line 519, in maybe_cythonize
raise RuntimeError("Cannot cythonize without Cython installed.")
RuntimeError: Cannot cythonize without Cython installed.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-x6hm0bxt/pandas/
以下パッケージをインストールする
pip3 install cython
pip3 install numpy
pandasの再バージョンアップを試みると解決できていた。
$ pip3 install -U pandas
Collecting pandas
Using cached https://files.pythonhosted.org/packages/09/39/fb93ed98962d032963418cd1ea5927b9e11c4c80cb1e0b45dea769d8f9a5/pandas-1.1.4.tar.gz
Collecting numpy>=1.15.4 (from pandas)
Collecting python-dateutil>=2.7.3 (from pandas)
Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
100% |████████████████████████████████| 235kB 425kB/s
Collecting pytz>=2017.2 (from pandas)
Downloading https://files.pythonhosted.org/packages/12/f8/ff09af6ff61a3efaad5f61ba5facdf17e7722c4393f7d8a66674d2dbd29f/pytz-2020.4-py2.py3-none-any.whl (509kB)
100% |████████████████████████████████| 512kB 595kB/s
Collecting six>=1.5 (from python-dateutil>=2.7.3->pandas)
Downloading https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Building wheels for collected packages: pandas
Running setup.py bdist_wheel for pandas ... -/
done
Stored in directory: /home/jetson/.cache/pip/wheels/45/5e/9b/1e8dbba01915fb08523e64dd84e7eff94e5da6ea9eba128bf5
Successfully built pandas
Installing collected packages: numpy, six, python-dateutil, pytz, pandas
Successfully installed numpy-1.19.4 pandas-1.1.4 python-dateutil-2.8.1 pytz-2020.4 six-1.15.0
$ python3 -c "import pandas as pd ;print(pd.__version__);"
1.1.4
参考
https://stackoverflow.com/questions/15175135/build-scipy-error-cythonize-failed