こんにちは。
こちらのサイト(https://nnabla.org/ja/download/)を参考に Raspberry Pi 3 B+ にnnablaをインストールしたのですがエラーが出ます。
以下に私が行ったインストールの手順を記載します。
【実行環境】
OS:raspbian 10.5
python 2.7.16と python 3.7.3 がデフォルトで入っている
pip 18.1
sudo -HE apt-get update
sudo -HE apt-get install -y --no-install-recommends
ca-certificates
cmake
curl
g++
git
libhdf5-dev
liblapack-dev
make
python-dev
python-pip
python-setuptools
python-wheel
curl -L https://github.com/google/protobuf/archive/v3.1.0.tar.gz -o protobuf-v3.1.0.tar.gz
tar xvf protobuf-v3.1.0.tar.gz
cd protobuf-3.1.0
mkdir build
cd build
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF ../cmake
make
sudo make install
cd ../..
sudo -HE pip install
--no-cache-dir
--global-option=build_ext
--global-option="-I/usr/include/hdf5/serial"
--global-option="-L/usr/lib/arm-linux-gnueabihf/hdf5/serial"
h5py
sudo apt-get install gfortran # error: library dfftpack has Fortran sources but no Fortran compiler found が出たため
pip --no-cache-dir install -U nnabla #MemoryErrorが出たため
インストールが完了したときの画面も書いておきます。
Installing collected packages: protobuf, scipy, tqdm, pyyaml, Cython, futures, imageio, contextlib2, docutils, python-dateutil, jmespath, botocore, s3transfer, boto3, nnabla
Running setup.py install for scipy ... done
The script tqdm is 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.
Running setup.py install for pyyaml ... done
Running setup.py install for Cython ... done
Running setup.py install for imageio ... done
The script nnabla_cli is 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.
Successfully installed Cython-0.29.14 boto3-1.11.5 botocore-1.14.5 contextlib2-0.6.0.post1 docutils-0.15.2 futures-3.3.0 imageio-2.6.1 jmespath-0.9.4 nnabla-1.4.0 protobuf-3.11.2 python-dateutil-2.8.1 pyyaml-5.3 s3transfer-0.3.1 scipy-1.2.2 tqdm-4.41.1
そして「python -c "import nnabla"」をするとImportErrorが出ます。以下のようになります。
pi@raspberrypi:~ $ python -c "import nnabla"
2020-01-18 16:05:53,807 [nnabla][INFO]: Initializing CPU extension...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/pi/.local/lib/python2.7/site-packages/nnabla/init.py", line 31, in <module>
from .variable import Variable, Context
File "/home/pi/.local/lib/python2.7/site-packages/nnabla/variable.py", line 17, in <module>
from ._variable import Context
ImportError: /home/pi/.local/lib/python2.7/site-packages/nnabla/_variable.so: undefined symbol: PyFPE_jbuf
/usr/lib/python2.7/atexit.py:24: RuntimeWarning: Parent module 'nnabla' not found while handling absolute import
func(*targs, ****kargs)
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, ****kargs)
File "_init.pyx", line 57, in nnabla._init.finalize
File "/home/pi/.local/lib/python2.7/site-packages/nnabla/init.py", line 17, in <module>
from . import _init # Must be imported first
ImportError: cannot import name _init
Error in sys.exitfunc:
Traceback (most recent call last):
File "/usr/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "_init.pyx", line 57, in nnabla._init.finalize
File "/home/pi/.local/lib/python2.7/site-packages/nnabla/init.py", line 17, in <module>
from . import _init # Must be imported first
ImportError: cannot import name _init
tqdmのPATHがうまく設定されていないと思い.bashrcファイルに「export PATH=$PATH:$HOME/.local/bin」を追加しましたが改善しませんでした。
一週間試行錯誤しましたが解決の糸口がつかめません。
どうか解決策をご教授いただきたいです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。