8000 Unable to install on Nvidia Xavier. Stuck at 100%. · Issue #4949 · scikit-image/scikit-image · GitHub
[go: up one dir, main page]

Skip to content

Unable to install on Nvidia Xavier. Stuck at 100%. #4949

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zendevil opened this issue Aug 29, 2020 · 11 comments
Closed

Unable to install on Nvidia Xavier. Stuck at 100%. #4949

zendevil opened this issue Aug 29, 2020 · 11 comments
Labels
💻 Arch specific Specific to a CPU architecture or OS 📦 Installation 🫂 Support User help and QA

Comments

@zendevil
Copy link
zendevil commented Aug 29, 2020

Description

Way to reproduce

pip3 install scikit-image

on Nvidia Jetson Xavier

Version information

>>> 3.6.9 (default, Jul 17 2020, 12:50:27) 
[GCC 8.4.0]
>>> Linux-4.9.140-tegra-aarch64-with-Ubuntu-18.04-bionic
>>> Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'skimage'
>>> numpy version: 1.13.3

scikit-image installation stuck at 100%

root@proto1:~/clotorch/resources# pip3 install scikit-image
The directory '/home/prikshet/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/prikshet/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting scikit-image
  Downloading https://files.pythonhosted.org/packages/54/fd/c1b0bb8f6f12ef9b4ee8d7674dac82cd482886f8b5cd165631efa533e237/scikit-image-0.17.2.tar.gz (29.8MB)
    100% |████████████████████████████████| 29.8MB 27kB/s 

When cloning and running pip3 install -e . Stuck at Obtaining file://foo/scikit-image

@zendevil zendevil changed the title Unable to install on Nvidia Xavier Unable to install on Nvidia Xavier. Stuck at 100%. Aug 29, 2020
@hmaarrfk hmaarrfk added 💻 Arch specific Specific to a CPU architecture or OS 📦 Installation labels Aug 29, 2020
@hmaarrfk
Copy link
Member

can you try

pip3 install scikit-image -vv

compilation takes time and I have a feeling it is taking time compiling things.

@sciunto was it you taking care of the labels? I would like a label to collate installation issues so that we may better track challenges users have getting started on that front.

@hmaarrfk
Copy link
Member

also, your numpy version is very old. you definitely need to satisfy https://github.com/scikit-image/scikit-image/blob/master/requirements/build.txt

I think below numpy 1.16, you will have a hard time on arm, but that is just my personal experience with that.

@sciunto
Copy link
Member
sciunto commented Aug 30, 2020

What do you need specifically? type: installation is not sufficient? @hmaarrfk

@zendevil
Copy link
Author
zendevil commented Aug 30, 2020

with -vv it errors out with the following:


    /usr/local/lib/python3.6/dist-packages/numpy/distutils/system_info.py:1748: 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.
      return getattr(self, '_calc_info_{}'.format(name))()
      NOT AVAILABLE

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-g_sngh2o/scipy/setup.py", line 583, in <module>
        setup_package()
      File "/tmp/pip-build-g_sngh2o/scipy/setup.py", line 579, in setup_package
        setup(**metadata)
      File "/usr/local/lib/python3.6/dist-packages/numpy/distutils/core.py", line 135, in setup
        config = configuration()
      File "/tmp/pip-build-g_sngh2o/scipy/setup.py", line 477, in configuration
        raise NotFoundError(msg)
    numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
error
  Can't rollback scipy, nothing uninstalled.
Cleaning up...
  Removing source in /tmp/pip-build-g_sngh2o/scipy
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g_sngh2o/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-z1mly8zh-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-g_sngh2o/scipy/
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 360, in run
    prefix=options.prefix_path,
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 878, in install
    spinner=spinner,
  File "/usr/lib/python3/dist-packages/pip/utils/__init__.py", line 725, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-g_sngh2o/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-z1mly8zh-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-g_sngh2o/scipy/
root@proto1:~# root@proto1:~# root@proto1:~#  python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.__version__
'1.19.1'

Guessing that scipy needs to be installed.

root@proto1:~# git clone https://github.com/scipy/scipy

root@proto1:~# cd scipy
root@proto1:~/scipy# python3 -m pip install -e .
Obtaining file:///home/prikshet/scipy
Installing collected packages: scipy
  Found existing installation: scipy 1.6.0.dev0+47e6df1
    Can't uninstall 'scipy'. No files were found to uninstall.
  Running setup.py develop for scipy
    Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/home/prikshet/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps:
    scipy/linalg/_generate_pyx.py: all files up-to-date
    scipy/special/_generate_pyx.py: all files up-to-date
    Running scipy/linalg/_generate_pyx.py
    Running scipy/special/_generate_pyx.py
    scipy/fftpack/convolve.pyx has not changed
    scipy/linalg/_solve_toeplitz.pyx has not changed
    scipy/linalg/_matfuncs_sqrtm_triu.pyx has not changed
    scipy/linalg/cython_lapack.pyx has not changed
    scipy/linalg/cython_blas.pyx has not changed
    scipy/linalg/_decomp_update.pyx.in has not changed
    scipy/signal/_sosfilt.pyx has not changed
    scipy/signal/_spectral.pyx has not changed
    scipy/signal/_upfirdn_apply.pyx has not changed
    scipy/signal/_max_len_seq_inner.pyx has not changed
    scipy/special/_ellip_harm_2.pyx has not changed
    scipy/special/_ufuncs.pyx has not changed
    scipy/signal/_peak_finding_utils.pyx has not changed
    scipy/special/_ufuncs_cxx.pyx has not changed
    scipy/special/cython_special.pyx has not changed
    scipy/special/_test_round.pyx has not changed
    scipy/spatial/qhull.pyx has not changed
    scipy/special/_comb.pyx has not changed
    scipy/spatial/_voronoi.pyx has not changed
    scipy/spatial/ckdtree.pyx has not changed
    scipy/spatial/_hausdorff.pyx has not changed
    scipy/spatial/transform/rotation.pyx has not changed
    scipy/optimize/_group_columns.pyx has not changed
    scipy/optimize/_bglu_dense.pyx has not changed
    scipy/optimize/cython_optimize/_zeros.pyx.in has not changed
    scipy/optimize/_trlib/_trlib.pyx has not changed
    scipy/optimize/_lsq/givens_elimination.pyx has not changed
    scipy/cluster/_hierarchy.pyx has not changed
    scipy/cluster/_vq.pyx has not changed
    scipy/stats/_stats.pyx has not changed
    scipy/ndimage/src/_ni_label.pyx has not changed
    scipy/ndimage/src/_cytest.pyx has not changed
    scipy/cluster/_optimal_leaf_ordering.pyx has not changed
    scipy/sparse/_csparsetools.pyx.in has not changed
    scipy/sparse/csgraph/_flow.pyx has not changed
    scipy/sparse/csgraph/_min_spanning_tree.pyx has not changed
    scipy/sparse/csgraph/_shortest_path.pyx has not changed
    scipy/sparse/csgraph/_traversal.pyx has not changed
    scipy/sparse/csgraph/_tools.pyx has not changed
    scipy/sparse/csgraph/_reordering.pyx has not changed
    scipy/sparse/csgraph/_matching.pyx has not changed
    scipy/interpolate/_ppoly.pyx has not changed
    scipy/interpolate/_bspl.pyx has not changed
    scipy/interpolate/interpnd.pyx has not changed
    scipy/io/matlab/mio_utils.pyx has not changed
    scipy/io/matlab/mio5_utils.pyx has not changed
    scipy/_lib/_ccallback_c.pyx has not changed
    scipy/_lib/_test_deprecation_call.pyx has not changed
    scipy/_lib/_test_deprecation_def.pyx has not changed
    scipy/io/matlab/streams.pyx has not changed
    scipy/_lib/messagestream.pyx has not changed
    Cythonizing sources
    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:
      libraries openblas not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
    
    openblas_clapack_info:
      libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
    
    flame_info:
      libraries flame not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
    
    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
      libraries lapack_atlas not found in /usr/local/lib
      libraries tatlas,tatlas not found in /usr/local/lib
      libraries lapack_atlas not found in /usr/lib
      libraries tatlas,tatlas not found in /usr/lib
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
      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:
      libraries lapack_atlas not found in /usr/local/lib
      libraries satlas,satlas not found in /usr/local/lib
      libraries lapack_atlas not found in /usr/lib
      libraries satlas,satlas not found in /usr/lib
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
      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
      libraries lapack_atlas not found in /usr/local/lib
      libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
      libraries lapack_atlas not found in /usr/lib
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
      libraries ptf77blas,ptcblas,atlas not found in /usr/lib/aarch64-linux-gnu
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE
    
    atlas_info:
      libraries lapack_atlas not found in /usr/local/lib
      libraries f77blas,cblas,atlas not found in /usr/local/lib
      libraries lapack_atlas not found in /usr/lib
      libraries f77blas,cblas,atlas not found in /usr/lib
      libraries lapack_atlas not found in /usr/lib/aarch64-linux-gnu
      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:
      libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']
      NOT AVAILABLE
    
    lapack_src_info:
      NOT AVAILABLE
    
      NOT AVAILABLE
    
    Running from SciPy source directory.
    /usr/local/lib/python3.6/dist-packages/numpy/distutils/system_info.py:1748: 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.
      return getattr(self, '_calc_info_{}'.format(name))()
    /usr/local/lib/python3.6/dist-packages/numpy/distutils/system_info.py:1748: 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.
      return getattr(self, '_calc_info_{}'.format(name))()
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/prikshet/scipy/setup.py", line 590, in <module>
        setup_package()
      File "/home/prikshet/scipy/setup.py", line 586, in setup_package
        setup(**metadata)
      File "/usr/local/lib/python3.6/dist-packages/numpy/distutils/core.py", line 135, in setup
        config = configuration()
      File "/home/prikshet/scipy/setup.py", line 484, in configuration
        raise NotFoundError(msg)
    numpy.distutils.system_info.NotFoundError: No BLAS/LAPACK libraries found.
    To build Scipy from sources, BLAS & LAPACK libraries need to be installed.
    See site.cfg.example in the Scipy source directory and
    https://docs.scipy.org/doc/scipy/reference/building/index.html for details.
    
    ----------------------------------------
  Can't roll back scipy; was not uninstalled
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/home/prikshet/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps" failed with error code 1 in /home/prikshet/scipy/
root@proto1:~/scipy# 

@sciunto
Copy link
Member
sciunto commented Aug 30, 2020

Install liblapack from your package manager.

@zendevil
Copy link
Author
zendevil commented Aug 30, 2020

Did

sudo apt-get install libatlas3-base

from

https://askubuntu.com/questions/300542/liblapack-so-file

still getting

 libraries lapack not found in ['/usr/local/lib', '/usr/lib', '/usr/lib/aarch64-linux-gnu']

Also built from source

sudo apt-get install gfortran
git clone https://github.com/Reference-LAPACK/lapack
cd lapack
mkdir build
cd build
cmake -DCMAKE_INSTALL_LIBDIR=$HOME/.local/lapack ..
cmake --build . -j --target install

Still getting the error.

@sciunto
Copy link
Member
sciunto commented Aug 30, 2020

you likely need the dev files which are usually provided separately on your OS. Anyway, it doesn't seem to be an issue for scikit-image.

@FirefoxMetzger
Copy link
Contributor

I second @sciunto . You are compiling C code during the installation process which means you don't just need the shared libraries (obtained via libatlas-base), but also the header files (obtained via libatlas-base-dev) so that the linker knows how to link against the libraries.

At the very least you will need

sudo apt-get install libatlas3-base libatlas-base-dev

and depending on other bindings you might need the header files for lapack and blas, too. (liblapack-dev and libblas-dev).

@hmaarrfk
Copy link
Member

For what it's worth.co da forge just aren't through this compilation procedure.

Depending on your other dependencies, you might have some luck with conda and conda forge

@sciunto sciunto added the 🫂 Support User help and QA label Aug 30, 2020
@hmaarrfk
Copy link
Member

Here are the links to what I was talking about

  1. Install miniforge: https://github.com/conda-forge/miniforge/ for aarch64
  2. Then you should be OK to install scikit-image: https://github.com/conda-forge/scikit-image-feedstock

Putting my conda-forge contributor hat on: while we (conda-forge) don't don't have the full list of packages for aarch64 compiled, we have quite a few and we recently got scikit-image. If your stack ends there, then it will really help boost you in your installation procedure. If you also need packages that we haven't compiled yet, for example opencv, then you will have to work on a more complete solution for your particular application.

@FirefoxMetzger did give pointers in the right direction, So I think that will help.

@sciunto
Copy link
Member
sciunto commented Sep 3, 2020

As we do not have further replies and the issue is not related to scikit-image, I'm closing. If not solved, feel free to reopen.

@sciunto sciunto closed this as completed Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 Arch specific Specific to a CPU architecture or OS 📦 Installation 🫂 Support User help and QA
Projects
None yet
Development

No branches or pull requests

4 participants
0