Toybrick

楼主: jefferyzhang

rknn-toolkit & rknn-api for Toybrick

 

kexuejia

新手上路

积分
42
楼主
发表于 2020-3-2 13:41:54 | 显示全部楼层
本帖最后由 kexuejia 于 2020-3-2 13:44 编辑

大神你好,请问一下在debian 10上面如何升级rknn版本到1.3.0呢

【通过pip3 install --user -U rknn命令安装,会提示 ERROR: No matching distribution found for rknn】
toybrick@debian10:~/Downloads$ uname -a      
Linux debian10.toybrick 4.4.189 #93 SMP Tue Nov 26 16:40:07 CST 2019 aarch64 GNU/Linux
toybrick@debian10:~/Downloads$ cat /etc/pip.conf
[global]
extra-index-url = http://repo.rock-chips.com/pypi/simple
trusted-host = repo.rock-chips.com
toybrick@debian10:~/Downloads$ pip3 list | grep rknn
rknn-toolkit         1.2.1   
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
toybrick@debian10:~/Downloads$ pip3 install --user -U rknn
Looking in indexes: http://repo.rock-chips.com/pypi/simple, https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement rknn (from versions: none)
ERROR: No matching distribution found for rknn
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

【从百度云盘上下载whl文件,安装rknn_toolkit-1.3.0-cp36-cp36m-linux_aarch64.whl 也会提示失败】
toybrick@debian10:~/Downloads$ ls
rknn_toolkit-1.3.0-cp36-cp36m-linux_aarch64.whl
toybrick@debian10:~/Downloads$ pip3 install ./rknn_toolkit-1.3.0-cp36-cp36m-linux_aarch64.whl
ERROR: rknn_toolkit-1.3.0-cp36-cp36m-linux_aarch64.whl is not a supported wheel on this platform.
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

【更新rknn-rk3399pro也会提示已经是最新版本了】
toybrick@debian10:~/Downloads$ sudo apt install rknn-rk3399pro
Reading package lists... Done
Building dependency tree      
Reading state information... Done
rknn-rk3399pro is already the newest version (1.2.1-1).
0 upgraded, 0 newly installed, 0 to remove and 84 not upgraded.

回复

使用道具 举报

kexuejia

新手上路

积分
42
沙发
发表于 2020-3-2 17:35:22 | 显示全部楼层
jefferyzhang 发表于 2020-3-2 14:14
参看帖子:http://t.rock-chips.com/forum.php?mod=viewthread&tid=1319&extra=page%3D1

【 sudo apt install rknn-rk3399pro 执行成功,能够将rknn-api升级到1.3】
但是【 pip3 install --user -U rknn】依旧会提示错误


toybrick@debian10:~/Downloads$ pip3 install --user -U rknn
Looking in indexes: http://repo.rock-chips.com/pypi/simple, https://pypi.tuna.tsinghua.edu.cn/simple
ERROR: Could not find a version that satisfies the requirement rknn (from versions: none)
ERROR: No matching distribution found for rknn
WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
toybrick@debian10:~/Downloads$ sudo apt install rknn-rk3399pro
[sudo] password for toybrick:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
rknn-rk3399pro is already the newest version (1.3.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
回复

使用道具 举报

kexuejia

新手上路

积分
42
板凳
发表于 2020-3-3 17:03:22 | 显示全部楼层
jefferyzhang 发表于 2020-3-2 20:48
rknn-rk3399pro is already the newest version (1.3.0-1).
有什么问题么?


rknn-api是已经更新到1.3.0了,但是rknn-toolkit 还是1.2.1版本
【 pip3 install --user -U rknn】依旧会提示错误


pip3 list | grep rknn
rknn-toolkit         1.2.1   
回复

使用道具 举报

kexuejia

新手上路

积分
42
地板
发表于 2020-3-3 21:27:42 | 显示全部楼层
lijie 发表于 2020-3-2 23:17
问题是,rknn-api是1.3.0但是rknn-toolkit是1.2。

正解,兄弟,你后面解决了么?
回复

使用道具 举报

kexuejia

新手上路

积分
42
5#
发表于 2020-3-3 22:48:02 | 显示全部楼层
执行pip3 install --user -U rknn语句后,需要下载
Collecting scipy==1.3.0
  Downloading https://files.pythonhosted.org/p ... /scipy-1.3.0.tar.gz (23.6MB)
而安装 scipy==1.3.0过程中报错如下:
ERROR: Command errored out with exit status 2: /usr/bin/python3 /usr/local/lib/python3.7/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-_j1c4izy/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url http://repo.rock-chips.com/pypi/simple --trusted-host repo.rock-chips.com -- wheel setuptools 'Cython>=0.29.2' 'numpy==1.13.3; python_version=='"'"'3.5'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"'' Check the logs for full command output.

如安装http://repo.rock-chips.com/pypi/simple/scipy/页面提供的1.12版本
sudo pip3 install scipy-1.2.0-cp36-cp36m-linux_aarch64.whl ,则会有以下错误:
ERROR: scipy-1.2.0-cp36-cp36m-linux_aarch64.whl is not a supported wheel on this platform.

请问如何解决?
回复

使用道具 举报

kexuejia

新手上路

积分
42
6#
发表于 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.
回复

使用道具 举报

kexuejia

新手上路

积分
42
7#
发表于 2020-3-4 10:50:47 | 显示全部楼层
jefferyzhang 发表于 2020-3-4 10:45
试试apt的先卸了,我们装的时候都挺顺利的呢。。
估计遇到了什么奇怪的依赖了吧。。
我有空装个 ...

卸了apt装的scipy=1.1
使用apt装scipy1.3 包不存在
使用pip装scipy1.3  报错依旧如上
回复

使用道具 举报

kexuejia

新手上路

积分
42
8#
发表于 2020-3-4 11:54:56 | 显示全部楼层
感觉不是源的问题。由于官方源下载较慢,使用以下官方源的路径下载安装包https://files.pythonhosted.org/p ... /scipy-1.3.0.tar.gz
再次使用sudo pip3 install scipy-1.3.0.tar.gz.安装本地包,依旧报108楼的错误。
回复

使用道具 举报

kexuejia

新手上路

积分
42
9#
发表于 2020-3-4 16:28:23 | 显示全部楼层
jefferyzhang 发表于 2020-3-4 14:35
稍等下,相关工程师正在测试

遇到的问题:
no lapack/blas resources found

解决方案:
sudo apt-get install gcc gfortran python-dev libopenblas-dev liblapack-dev cython

参考链接:https://docs.scipy.org/doc/scipy ... eneric-instructions

安装完上述依赖,再安装scipy就可以正常操作了
回复

使用道具 举报

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

本版积分规则

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


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