NanoPi NEO4にWiringPi-Python for RK3399をインストール
インストールされているPythonのバージョンを確認。Python2,Python3の両方がインストールされている。
pi@NanoPi-NEO4:~$ python --version
Python 2.7.15+
pi@NanoPi-NEO4:~$ python3 --version
Python 3.6.8
とりあえず、Python3用のものをインストール
cd /var/tmp/
sudo apt install git python-dev python-setuptools python3-dev python3-setuptools swig
apt install git python-dev python-setuptools python3-dev python3-setuptools swig
wget https://pypi.io/packages/source/s/setuptools/setuptools-33.1.1.zip
unzip setuptools-33.1.1.zip
cd setuptools-33.1.1
python3 setup.py install
wget http://112.124.9.243:8888/wiringpi/friendlyelec-rk3399/wiringpi-2.44.4-py3.6-linux-aarch64.egg
easy_install wiringpi-2.44.4-py3.6-linux-aarch64.egg
最後のところでエラー。easy_installが無いらしい。
pi@NanoPi-NEO4:/var/tmp/setuptools-33.1.1$ easy_install wiringpi-2.44.4-py3.6-linux-aarch64.egg
-bash: easy_install: command not found
見直してみるとpython3 setup.py installの実行時にPermission deniedのエラーがあった。
pi@NanoPi-NEO4:/var/tmp/setuptools-33.1.1$ python3 setup.py install
running install
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
installation directory:
[Errno 13] Permission denied: '/usr/local/lib/python3.6/dist-packages/test-easy-install-3319.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
/usr/local/lib/python3.6/dist-packages/
Perhaps your account does not have write access to this directory? If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account. If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.
For information on other options, you may wish to consult the
documentation at:
https://setuptools.readthedocs.io/en/latest/easy_install.html
Please make the appropriate changes for your system and try again.
pi@NanoPi-NEO4:/var/tmp/setuptools-33.1.1$
sudo python3 setup.py installでインストール成功。easy_installが実行できるようになった。
pi@NanoPi-NEO4:/var/tmp$ sudo easy_install
error: No urls, filenames, or requirements specified (see --help)
WiringPi-Python for RK3399のインストールも成功。
pi@NanoPi-NEO4:/var/tmp$ sudo easy_install wiringpi-2.44.4-py3.6-linux-aarch64.egg
Processing wiringpi-2.44.4-py3.6-linux-aarch64.egg
creating /usr/local/lib/python3.6/dist-packages/wiringpi-2.44.4-py3.6-linux-aarch64.egg
Extracting wiringpi-2.44.4-py3.6-linux-aarch64.egg to /usr/local/lib/python3.6/dist-packages
Adding wiringpi 2.44.4 to easy-install.pth file
Installed /usr/local/lib/python3.6/dist-packages/wiringpi-2.44.4-py3.6-linux-aarch64.egg
Processing dependencies for wiringpi==2.44.4
Finished processing dependencies for wiringpi==2.44.4
pi@NanoPi-NEO4:/var/tmp$ pip3 list
-- 中略 --
wiringpi (2.44.4)
この記事が気に入ったらサポートをしてみませんか?