Translate

2020年2月12日水曜日

Donkeycar をJetson Nanoへインストール中 pip install -e .[nano] したら、AttributeErrorが出た件

Donkeycar の公式ドキュメント通りJetson Nano上へDonkeycarをインストールしていたら、python donkeycar パッケージの pip install 中に以下のような Attribute Errorが発生した。


(env) hogehoge@fugafuga: ~/projects/donkeycar$ pip install -e .[nano]
Obtaining file:///home/hogehoge/projects/donkeycar
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from donkeycar==3.1.1) (1.13.3)
Requirement already satisfied: pillow in /usr/lib/python3/dist-packages (from donkeycar==3.1.1) (5.1.0)
Collecting docopt
  Using cached docopt-0.6.2.tar.gz (25 kB)
Collecting tornado
  Using cached tornado-6.0.3.tar.gz (482 kB)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from donkeycar==3.1.1) (2.18.4)
Collecting h5py
  Using cached h5py-2.10.0.tar.gz (301 kB)
Collecting moviepy
  Using cached moviepy-1.0.1.tar.gz (373 kB)
Collecting pandas
  Using cached pandas-1.0.1.tar.gz (4.9 MB)
  Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
   command: /home/hogehoge/env/bin/python /home/hori/env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpf4z2oxsg
       cwd: /tmp/pip-install-ycyri24h/pandas
  Complete output (10 lines):
  Traceback (most recent call last):
    File "/home/hogehoge/env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in
      main()
    File "/home/hogehoge/env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/home/hogehoge/env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 85, in get_requires_for_build_wheel
      backend = _build_backend()
    File "/home/hogehoge/env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 76, in _build_backend
      obj = getattr(obj, path_part)
  AttributeError: module 'setuptools.build_meta' has no attribute '__legacy__'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /home/hogehoge/env/bin/python /home/hogehoge/env/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpf4z2oxsg Check the logs for full command output.
(env) hogehoge@fugafuga: ~/projects/donkeycar$

上記のpip install は何度もやり直しているので、すでにインストールしたパッケージはダウンロードゲージが出ていない。

調べると setuptools の Issue#1694 https://github.com/pypa/setuptools/issues/1694 に情報が乗っていた。

ああ、pip install する際に、 --no-use-pep517 をつければいいんだ..

とおもい、つけて実行してみると..

cannot cytonize without Cython installed.

..今度は Cythonパッケージ無しで cythonizeしようとしているとかいうエラーが出た..

しょうがないので

pip install cython を実行し、pip install -e .[nano] --no-use-pep517 を実行したら..


うまくいった。


----
cythonってpythonモジュールをCで開発したモジュール並みの速度で実行できるやーつだったっけ..




とりあえず、先に進んでみるか..

0 件のコメント:

既存アプリケーションをK8s上でコンテナ化して動かす場合の設計注意事項メモ

既存アプリをK8sなどのコンテナにして動かすには、どこを注意すればいいか..ちょっと調べたときの注意事項をメモにした。   1. The Twelve Factors (日本語訳からの転記) コードベース   バージョン管理されている1つのコードベースと複数のデプロイ 依存関係 ...