Toybrick

楼主: jefferyzhang

rknn-toolkit & rknn-api for Toybrick

 

lijie

注册会员

积分
89
101#
发表于 2020-3-4 01:42:25 | 只看该作者
kexuejia 发表于 2020-3-3 21:27
正解,兄弟,你后面解决了么?

如果是python3.5和3.6可以下这个网站上附带的rknn-toolkit1.3.0。

如果是python3.7的话,因为我之前保存了了一份rknn-toolkit1.3.0的版本,在$HOME/.local/lib/python3.7/site-packages下。因为现在下不到3.7的所以只能通过拷贝之前的这些文件到新的机器上。

然后tensorflow的安装可以搜tensorflow-on-arm安装,因为之前是通过toybrick的pypi安装,现在源不work了,只能手动上网下载tensorflow的wheel包
回复

使用道具 举报

lijie

注册会员

积分
89
102#
发表于 2020-3-4 02:00:24 | 只看该作者
kexuejia 发表于 2020-3-3 22:48
执行pip3 install --user -U rknn语句后,需要下载
Collecting scipy==1.3.0
  Downloading https://files. ...

通过你的:
/usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip
说明你的python版本是3.7的

你要装的这whl包里的cp36字样说明这个包是适用于3.6的,pip3 install scipy-1.2.0-cp36-cp36m-linux_aarch64.whl

如果toybrick的pypi不work,你得把你的pip.conf里的设置换成163或者阿里的源,再用pip装即可。

更快的方法是,如果你的系统是debian10,用的是python3.7的话,大部分包可以通过sudo apt install python3-***安装,例如scipy是sudo apt install python3-scipy。这个的缺点是有时候版本会比较旧。但是绝大部分情况没有问题。
回复

使用道具 举报

lijie

注册会员

积分
89
103#
发表于 2020-3-4 02:05:50 | 只看该作者
tomyhome 发表于 2020-3-3 17:17
你好,是onnx安装错误,因为没有1.4.1版本当然,scipy也是没有对应版本
root@debian10:~# pip3 install -U ...

你可以先把toybrick的pypi源关闭,用阿里或者163源pip源装好依赖。

或者用sudo apt install python3-onnx 安装也可

安装好依赖可以直接用这个包放到$HOME/.local/lib/python3.7/site-packages下,这个tar是rknn-toolkit1.3.0的文件
https://www.jianguoyun.com/p/DVLVmBUQl9KTCBiF5-kC
回复

使用道具 举报

lijie

注册会员

积分
89
104#
发表于 2020-3-4 02:10:24 | 只看该作者
rknn-toolkit1.3.0的依赖是:
Pillow==5.3.0
dill==0.2.8.2
flask==1.0.2
flatbuffers==1.10
h5py==2.8.0
lmdb==0.93
networkx==1.11
numpy==1.16.3
onnx-tf==1.2.1
onnx==1.4.1
ply==3.11
protobuf==3.6.1
psutil==5.6.2
requests==2.22.0
ruamel.yaml==0.15.81
scipy==1.3.0

对于python3.7的安装, 可以放到requirement里换阿里云或163的pypi源来安装。安装好后,把这个链接里的文件解压放到$HOME/.local/lib/python3.7/site-packages下即可。
https://www.jianguoyun.com/p/DVLVmBUQl9KTCBiF5-kC

$HOME/.local/lib/python3.7/site-packages是pip的安装默认路径
回复

使用道具 举报

tomyhome

中级会员

积分
270
105#
发表于 2020-3-4 09:46:27 | 只看该作者
lijie 发表于 2020-3-4 02:10
rknn-toolkit1.3.0的依赖是:
Pillow==5.3.0
dill==0.2.8.2

请帮帮忙,还是这个scipy装不上,编译不通过
----------------------------------------
  ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
回复

使用道具 举报

tomyhome

中级会员

积分
270
106#
发表于 2020-3-4 10:06:16 | 只看该作者
jefferyzhang 发表于 2020-3-3 17:49
看1.3.0的发布贴,手动安装完再装。帖子里都写着。

你好,按照这个贴子后来的帮忙,已经装好其他依赖项,非常艰辛的说,但还剩下scipy装不上,提示如下
----------------------------------------
  ERROR: Failed building wheel for scipy
Failed to build scipy
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly
请问怎么解决?你们的库并没有提供scipy1.3.0 python3.7版轮子
回复

使用道具 举报

jefferyzhang

版主

积分
13572
107#
 楼主| 发表于 2020-3-4 10:20:54 | 只看该作者
tomyhome 发表于 2020-3-4 10:06
你好,按照这个贴子后来的帮忙,已经装好其他依赖项,非常艰辛的说,但还剩下scipy装不上,提示如下
---- ...

用apt装,python涉及依赖的pip是无法解决依赖的,你要用apt install python3-xxxx 这样的形式去找库
回复

使用道具 举报

kexuejia

新手上路

积分
42
108#
发表于 2020-3-4 10:39:49 | 只看该作者
lijie 发表于 2020-3-4 02:10
rknn-toolkit1.3.0的依赖是:
Pillow==5.3.0
dill==0.2.8.2

您好,根据您的描述,requirement文件中其他包均已安装相应版本,但scipy安装过程出现错误,这个请问要如何解决呢?错误内容如下:

toybrick@debian10:~/test$ sudo pip3 install scipy==1.3.0
Looking in indexes: http://mirrors.aliyun.com/pypi/simple/, http://repo.rock-chips.com/pypi/simple
WARNING: The repository located at repo.rock-chips.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host repo.rock-chips.com'.
Collecting scipy==1.3.0
  Downloading http://mirrors.aliyun.com/pypi/p ... /scipy-1.3.0.tar.gz (23.6MB)
     |████████████████████████████████| 23.6MB 409kB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpvqrfx7d4
         cwd: /tmp/pip-install-n0s761lk/scipy
    Complete output (142 lines):
    lapack_opt_info:
    lapack_mkl_info:
    customize UnixCCompiler
      libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
   
    openblas_lapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
   
    openblas_clapack_info:
    customize UnixCCompiler
    customize UnixCCompiler
      libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
   
    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
    customize UnixCCompiler
      libraries tatlas,tatlas not found in /usr/lib/aarch64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE
   
    atlas_3_10_info:
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
    customize UnixCCompiler
      libraries satlas,satlas not found in /usr/lib/aarch64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE
   
    atlas_threads_info:
    Setting PTATLAS=ATLAS
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
    customize UnixCCompiler
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib/aarch64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE
   
    atlas_info:
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/local/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib
    customize UnixCCompiler
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
    customize UnixCCompiler
      libraries f77blas,cblas,atlas not found in /usr/lib/aarch64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE
   
    accelerate_info:
      NOT AVAILABLE
   
    lapack_info:
    customize UnixCCompiler
      libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
   
    lapack_src_info:
      NOT AVAILABLE
   
      NOT AVAILABLE
   
    setup.py:111: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
      import imp
    setup.py:388: UserWarning: Unrecognized setuptools command ('dist_info --egg-base /tmp/pip-modern-metadata-9k8nh6xh'), proceeding with generating Cython sources and expanding templates
      ' '.join(sys.argv[1:])))
    Running from scipy source directory.
    /usr/local/lib/python3.7/dist-packages/numpy/distutils/system_info.py:638: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    /usr/local/lib/python3.7/dist-packages/numpy/distutils/system_info.py:638: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      self.calc_info()
    /usr/local/lib/python3.7/dist-packages/numpy/distutils/system_info.py:638: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      self.calc_info()
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
        main()
      File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/usr/local/lib/python3.7/dist-packages/setuptools/build_meta.py", line 156, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "/usr/local/lib/python3.7/dist-packages/setuptools/build_meta.py", line 237, in run_setup
        self).run_setup(setup_script=setup_script)
      File "/usr/local/lib/python3.7/dist-packages/setuptools/build_meta.py", line 142, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 505, in <module>
        setup_package()
      File "setup.py", line 501, in setup_package
        setup(**metadata)
      File "/usr/local/lib/python3.7/dist-packages/numpy/distutils/core.py", line 137, in setup
        config = configuration()
      File "setup.py", line 403, in configuration
        raise NotFoundError(msg)
    numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpvqrfx7d4 Check the logs for full command output.
回复

使用道具 举报

tomyhome

中级会员

积分
270
109#
发表于 2020-3-4 10:43:37 | 只看该作者
jefferyzhang 发表于 2020-3-4 10:20
用apt装,python涉及依赖的pip是无法解决依赖的,你要用apt install python3-xxxx 这样的形式去找库 ...

apt安装了一个版本,是1.1.1,就是因为这个安装不了新版本,所以才要问啊
回复

使用道具 举报

jefferyzhang

版主

积分
13572
110#
 楼主| 发表于 2020-3-4 10:45:28 | 只看该作者
tomyhome 发表于 2020-3-4 10:43
apt安装了一个版本,是1.1.1,就是因为这个安装不了新版本,所以才要问啊

试试apt的先卸了,我们装的时候都挺顺利的呢。。
估计遇到了什么奇怪的依赖了吧。。
我有空装个干净的系统也试试
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

产品中心 购买渠道 开源社区 Wiki教程 资料下载 关于Toybrick


快速回复 返回顶部 返回列表