前提・実現したい
ラズパイを用いて画像処理100本ノックを行おうとしており、berryconda3を用いてチュートリアルの通りに環境構築していきました。Pythonです。
pip install numpy matplotlib opencv-python
実行中に以下のエラーメッセージが発生しました。
どうすればうまくインストールできるでしょうか。
発生している問題・エラーメッセージ
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-3i1xza0_/matplotlib/
該当のソースコード
(gasyori100) pi@raspberrypi:~/Gasyori100knock $ pip install numpy matplotlib opencv-python --user Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting numpy Using cached https://files.pythonhosted.org/packages/40/de/0ea5092b8bfd2e3aa6fdbb2e499a9f9adf810992884d414defc1573dca3f/numpy-1.18.1.zip Installing build dependencies ... done Collecting matplotlib Using cached https://files.pythonhosted.org/packages/be/74/24d058c17b155d131359f1cd01e120b3954686bf8b7853172b279237e1dc/matplotlib-3.1.3.tar.gz Complete output from command python setup.py egg_info: Processing numpy/random/_bounded_integers.pxd.in Processing numpy/random/_sfc64.pyx Traceback (most recent call last): File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/tools/cythonize.py", line 61, in process_pyx from Cython.Compiler.Version import version as cython_version ModuleNotFoundError: No module named 'Cython' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/tools/cythonize.py", line 238, in <module> main() File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/tools/cythonize.py", line 234, in main find_process_files(root_dir) File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/tools/cythonize.py", line 225, in find_process_files process(root_dir, fromfile, tofile, function, hash_db) File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/tools/cythonize.py", line 191, in process processor_function(fromfile, tofile) File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/tools/cythonize.py", line 66, in process_pyx raise OSError('Cython needs to be installed in Python as a module') OSError: Cython needs to be installed in Python as a module Running from numpy source directory. /tmp/easy_install-jtt3ee4f/numpy-1.18.1/setup.py:461: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates run_build = parse_setuppy_commands() Traceback (most recent call last): File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules yield saved File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context yield File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup _execfile(setup_script, ns) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile exec(code, globals, locals) File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/setup.py", line 488, in <module> File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/setup.py", line 469, in setup_package File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/setup.py", line 275, in generate_cython version=__version__, RuntimeError: Running cythonize failed! During handling of the above exception, another exception occurred: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-3i1xza0_/matplotlib/setup.py", line 311, in <module> cmdclass=cmdclass, File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/__init__.py", line 139, in setup _install_setup_requires(attrs) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/__init__.py", line 134, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/dist.py", line 514, in fetch_build_eggs replace_conflicting=True, File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/pkg_resources/__init__.py", line 777, in resolve replace_conflicting=replace_conflicting File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1060, in best_match return self.obtain(req, installer) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1072, in obtain return installer(requirement) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/dist.py", line 581, in fetch_build_egg return cmd.easy_install(req) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 676, in easy_install return self.install_item(spec, dist.location, tmpdir, deps) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 702, in install_item dists = self.install_eggs(spec, download, tmpdir) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 887, in install_eggs return self.build_and_install(setup_script, setup_base) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1155, in build_and_install self.run_setup(setup_script, setup_base, args) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1141, in run_setup run_setup(setup_script, args) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 253, in run_setup raise File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/contextlib.py", line 99, in __exit__ self.gen.throw(type, value, traceback) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context yield File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/contextlib.py", line 99, in __exit__ self.gen.throw(type, value, traceback) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 166, in save_modules saved_exc.resume() File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 141, in resume six.reraise(type, exc, self._tb) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/_vendor/six.py", line 685, in reraise raise value.with_traceback(tb) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules yield saved File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context yield File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup _execfile(setup_script, ns) File "/home/pi/berryconda3/envs/gasyori100/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile exec(code, globals, locals) File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/setup.py", line 488, in <module> File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/setup.py", line 469, in setup_package File "/tmp/easy_install-jtt3ee4f/numpy-1.18.1/setup.py", line 275, in generate_cython version=__version__, RuntimeError: Running cythonize failed! ================================================================================ Edit setup.cfg to change the build options BUILDING MATPLOTLIB matplotlib: yes [3.1.3] python: yes [3.6.6 | packaged by rpi | (default, Sep 6 2018, 10:56:14) [GCC 6.3.0 20170516]] platform: yes [linux] OPTIONAL SUBPACKAGES sample_data: yes [installing] tests: no [skipping due to configuration] OPTIONAL BACKEND EXTENSIONS agg: yes [installing] tkagg: yes [installing; run-time loading from Python Tcl/Tk] macosx: no [Mac OS-X only] OPTIONAL PACKAGE DATA dlls: no [skipping due to configuration] Cythonizing sources ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-3i1xza0_/matplotlib/
試したこと
pip install -r requirements.txt
補足情報(FW/ツールのバージョンなど)
https://github.com/yoyoyo-yo/Gasyori100knock/tree/master/Tutorial
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2020/02/16 18:08
退会済みユーザー
2020/02/16 19:07
2020/02/17 11:44