umr-lops / xsarsea

scientific functions to compute radar or geophysical parameters from satellite images over ocean
https://cerweb.ifremer.fr/datarmor/doc_sphinx/xsarsea/
MIT License
10 stars 6 forks source link

problem to install `xsar` and `xsarsea` python3.10 #40

Closed agrouaze closed 2 years ago

agrouaze commented 2 years ago

Following the installation documentation: https://cyclobs.ifremer.fr/static/sarwing_datarmor/xsarsea/installing.html An error occur with openCV and numpy:

Collecting opencv-python
  Downloading opencv_python-4.5.5.64-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.5/60.5 MB 12.6 MB/s eta 0:00:00
  Downloading opencv_python-4.5.5.62-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.4/60.4 MB 10.0 MB/s eta 0:00:00
  Downloading opencv_python-4.5.4.60-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (60.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.3/60.3 MB 10.0 MB/s eta 0:00:00
  Downloading opencv_python-4.5.4.58-cp310-cp310-manylinux2014_x86_64.whl (60.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.3/60.3 MB 6.4 MB/s eta 0:00:00
  Downloading opencv-python-4.5.3.56.tar.gz (89.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.2/89.2 MB 8.4 MB/s eta 0:00:00
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [927 lines of output]
      Ignoring numpy: markers 'python_version == "3.6" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.6" and sys_platform == "linux" and platform_machine == "aarch64"' don't match your environment
      Ignoring numpy: markers 'python_version >= "3.6" and sys_platform == "darwin" and platform_machine == "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.7" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Ignoring numpy: markers 'python_version == "3.8" and platform_machine != "aarch64" and platform_machine != "arm64"' don't match your environment
      Collecting setuptools
        Downloading setuptools-65.5.1-py3-none-any.whl (1.2 MB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 13.0 MB/s eta 0:00:00
      Collecting wheel
        Downloading wheel-0.38.4-py3-none-any.whl (36 kB)
      Collecting scikit-build
        Downloading scikit_build-0.16.2-py3-none-any.whl (78 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.1/78.1 kB 4.8 MB/s eta 0:00:00
      Collecting cmake
        Downloading cmake-3.25.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.7 MB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 23.7/23.7 MB 25.6 MB/s eta 0:00:00
      Collecting pip
        Downloading pip-22.3.1-py3-none-any.whl (2.1 MB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 30.9 MB/s eta 0:00:00
      Collecting numpy==1.19.3
        Downloading numpy-1.19.3.zip (7.3 MB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 37.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 packaging
        Downloading packaging-21.3-py3-none-any.whl (40 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.8/40.8 kB 2.0 MB/s eta 0:00:00
      Collecting distro
        Downloading distro-1.8.0-py3-none-any.whl (20 kB)
      Collecting pyparsing!=3.0.5,>=2.0.2
        Downloading pyparsing-3.0.9-py3-none-any.whl (98 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 98.3/98.3 kB 7.0 MB/s eta 0:00:00
      Building wheels for collected packages: numpy
        Building wheel for numpy (pyproject.toml): started
        Building wheel for numpy (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error

        × Building wheel for numpy (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [877 lines of output]
            setup.py:67: RuntimeWarning: NumPy 1.19.3 may not yet support Python 3.10.
              warnings.warn(
            Running from numpy source directory.

possible explanations to investigate are:

agrouaze commented 2 years ago

if opencv is installed via conda. The problem is different: First thtere this pip error:

Successfully built xsarsea
Installing collected packages: typer, numpy, llvmlite, numba, cftime, netCDF4, xrft, xsarsea
  Attempting uninstall: numpy
    Found existing installation: numpy 1.23.4
    Uninstalling numpy-1.23.4:
      Successfully uninstalled numpy-1.23.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
xsar 0.9.1 requires jinja2<=3.0.3, but you have jinja2 3.1.2 which is incompatible.
Successfully installed cftime-1.6.2 llvmlite-0.39.1 netCDF4-1.6.2 numba-0.56.4 numpy-1.21.0 typer-0.7.0 xrft-1.0.0 xsarsea-0.3.dev56+g0ccc3e3

then import xsarsea works. while import xsar never ends (strace last hints is pointing to cartopy). tested on a ubuntu 22.04 and python 3.10 conda env.

agrouaze commented 2 years ago

this issue seems to be solved with #42