BlueOS-community / blueos-jupyter

1 stars 2 forks source link

Having problem for installing Python libraries #6

Open robota-admin opened 1 year ago

robota-admin commented 1 year ago

I'm trying installing some python libraries in jupyter extension for BlueOS, like NumPy and MatPlotLib, but the result is a sub-process-error. The command I tried is "!pip install numpy" and the result was:

Obs:The libraries have already been installed via terminal using red-pill command, however the Jupyter dont find the module

WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. Collecting numpy Downloading numpy-1.26.1.tar.gz (15.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.7/15.7 MB 11.8 MB/s eta 0:00:0000:0100:01 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... error error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully. │ exit code: 1 ╰─> [45 lines of output] WARNING: The directory '/root/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag. Collecting ninja>=1.8.2 Downloading ninja-1.11.1.1.tar.gz (132 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/132.4 kB ? eta -:--:-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.4/132.4 kB 5.8 MB/s eta 0:00:00 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting patchelf>=0.11.0 Downloading patchelf-0.17.2.1-py2.py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl (381 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0.0/381.1 kB ? eta -:--:-- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 381.1/381.1 kB 13.8 MB/s eta 0:00:00 Building wheels for collected packages: ninja Building wheel for ninja (pyproject.toml): started Building wheel for ninja (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

    × Building wheel for ninja (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [15 lines of output]
        /tmp/pip-build-env-p1h5pi2r/overlay/lib/python3.11/site-packages/setuptools_scm/git.py:308: UserWarning: git archive did not support describe output
          warnings.warn("git archive did not support describe output")
        /tmp/pip-build-env-p1h5pi2r/overlay/lib/python3.11/site-packages/setuptools_scm/git.py:327: UserWarning: unprocessed git archival found (no export subst applied)
          warnings.warn("unprocessed git archival found (no export subst applied)")
        Traceback (most recent call last):
          File "/tmp/pip-build-env-p1h5pi2r/overlay/lib/python3.11/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
            cmkr = cmaker.CMaker(cmake_executable)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-p1h5pi2r/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 148, in __init__
            self.cmake_version = get_cmake_version(self.cmake_executable)
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-p1h5pi2r/overlay/lib/python3.11/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
            raise SKBuildError(msg) from err

        Problem with the CMake installation, aborting build. CMake executable is cmake
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed building wheel for ninja
  Failed to build ninja
  ERROR: Could not build wheels for ninja, which is required to install pyproject.toml-based projects

  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× pip subprocess to install backend dependencies did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

patrickelectric commented 1 year ago

@RaulTrombin can you take a quick look ?

RaulTrombin commented 1 year ago

@robota-admin on the jupyter console, please try: !apt install cmake libopenblas-dev then you should be able to install numpy

RaulTrombin commented 1 year ago

@robota-admin matplotlib also is working after provide cmake and libopenblas-dev.

matplotlib                3.8.0
matplotlib-inline         0.1.6
mistune                   3.0.1
nbclient                  0.8.0
nbconvert                 7.8.0
nbformat                  5.9.2
nest-asyncio              1.5.8
notebook_shim             0.2.3
numpy                     1.26.1