Giter Site home page Giter Site logo

Comments (11)

marinasie avatar marinasie commented on June 10, 2024 2

Thanks for helping me out @MaxHalford ! This is my traceback when running pip install river:

Building wheels for collected packages: river
  Building wheel for river (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for river (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [116 lines of output]
      A setup.py file already exists. Using it.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      # distutils: language = c++
      # distutils: extra_compile_args = "-std=c++11"

      import cython

      from .efficient_rollingrocauc cimport RollingROCAUC as CppRollingROCAUC
      ^
      ------------------------------------------------------------

      build/lib.linux-x86_64-cpython-312/river/metrics/efficient_rollingrocauc/efficient_rollingrocauc.pyx:6:0: relative cimport from non-package directory is not allowed

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      from .efficient_rollingrocauc cimport RollingROCAUC as CppRollingROCAUC

      cdef class EfficientRollingROCAUC:
          cdef cython.int positiveLabel
          cdef cython.ulong windowSize
          cdef CppRollingROCAUC* rollingrocauc
               ^
      ------------------------------------------------------------

      build/lib.linux-x86_64-cpython-312/river/metrics/efficient_rollingrocauc/efficient_rollingrocauc.pyx:11:9: 'CppRollingROCAUC' is not a type identifier

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          cdef CppRollingROCAUC* rollingrocauc

          def __cinit__(self, cython.int positiveLabel, cython.ulong windowSize):
              self.positiveLabel = positiveLabel
              self.windowSize = windowSize
              self.rollingrocauc = new CppRollingROCAUC(positiveLabel, windowSize)
                                       ^
      ------------------------------------------------------------

      build/lib.linux-x86_64-cpython-312/river/metrics/efficient_rollingrocauc/efficient_rollingrocauc.pyx:16:33: 'CppRollingROCAUC' is not a type identifier

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
          cdef CppRollingROCAUC* rollingrocauc

          def __cinit__(self, cython.int positiveLabel, cython.ulong windowSize):
              self.positiveLabel = positiveLabel
              self.windowSize = windowSize
              self.rollingrocauc = new CppRollingROCAUC(positiveLabel, windowSize)
                                   ^
      ------------------------------------------------------------

      build/lib.linux-x86_64-cpython-312/river/metrics/efficient_rollingrocauc/efficient_rollingrocauc.pyx:16:29: new operator can only be applied to a C++ class

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              self.windowSize = windowSize
              self.rollingrocauc = new CppRollingROCAUC(positiveLabel, windowSize)

          def __dealloc__(self):
              if not self.rollingrocauc == NULL:
                  del self.rollingrocauc
                          ^
      ------------------------------------------------------------

      build/lib.linux-x86_64-cpython-312/river/metrics/efficient_rollingrocauc/efficient_rollingrocauc.pyx:20:20: Deletion of non-Python, non-C++ object
      Compiling build/lib.linux-x86_64-cpython-312/river/drift/adwin_c.pyx because it changed.
      Compiling build/lib.linux-x86_64-cpython-312/river/metrics/efficient_rollingrocauc/efficient_rollingrocauc.pyx because it depends on /private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-build-env-w84ohfek/overlay/lib/python3.10/site-packages/Cython/Includes/libcpp/vector.pxd.
      Compiling build/lib.linux-x86_64-cpython-312/river/metrics/expected_mutual_info.pyx because it changed.
      Compiling build/lib.linux-x86_64-cpython-312/river/utils/vectordict.pyx because it changed.
      Compiling river/drift/adwin_c.pyx because it changed.
      Compiling river/metrics/efficient_rollingrocauc/efficient_rollingrocauc.pyx because it depends on /private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-build-env-w84ohfek/overlay/lib/python3.10/site-packages/Cython/Includes/libcpp/vector.pxd.
      Compiling river/metrics/expected_mutual_info.pyx because it changed.
      Compiling river/utils/vectordict.pyx because it changed.
      [1/8] Cythonizing build/lib.linux-x86_64-cpython-312/river/drift/adwin_c.pyx
      [2/8] Cythonizing build/lib.linux-x86_64-cpython-312/river/metrics/expected_mutual_info.pyx
      [3/8] Cythonizing build/lib.linux-x86_64-cpython-312/river/utils/vectordict.pyx
      [4/8] Cythonizing river/drift/adwin_c.pyx
      [5/8] Cythonizing river/metrics/expected_mutual_info.pyx
      [6/8] Cythonizing river/utils/vectordict.pyx
      [7/8] Cythonizing build/lib.linux-x86_64-cpython-312/river/metrics/efficient_rollingrocauc/efficient_rollingrocauc.pyx
      Traceback (most recent call last):
        File "/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-install-8jj_hf2x/river_5c1dc9f218384df098e06c22f57902ef/setup.py", line 82, in <module>
          from build import *
        File "/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-install-8jj_hf2x/river_5c1dc9f218384df098e06c22f57902ef/build.py", line 22, in <module>
          ext_modules = cythonize(
        File "/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-build-env-w84ohfek/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
          cythonize_one(*args)
        File "/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-build-env-w84ohfek/overlay/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: build/lib.linux-x86_64-cpython-312/river/metrics/efficient_rollingrocauc/efficient_rollingrocauc.pyx
      Traceback (most recent call last):
        File "/Users/user/miniconda3/envs/bird/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/user/miniconda3/envs/bird/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/Users/user/miniconda3/envs/bird/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-build-env-w84ohfek/overlay/lib/python3.10/site-packages/poetry/core/masonry/api.py", line 58, in build_wheel
          return WheelBuilder.make_in(
        File "/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-build-env-w84ohfek/overlay/lib/python3.10/site-packages/poetry/core/masonry/builders/wheel.py", line 88, in make_in
          wb.build(target_dir=directory)
        File "/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-build-env-w84ohfek/overlay/lib/python3.10/site-packages/poetry/core/masonry/builders/wheel.py", line 121, in build
          self._build(zip_file)
        File "/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-build-env-w84ohfek/overlay/lib/python3.10/site-packages/poetry/core/masonry/builders/wheel.py", line 182, in _build
          self._run_build_command(setup)
        File "/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-build-env-w84ohfek/overlay/lib/python3.10/site-packages/poetry/core/masonry/builders/wheel.py", line 248, in _run_build_command
          subprocess.check_call([
        File "/Users/user/miniconda3/envs/bird/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/Users/user/miniconda3/envs/bird/bin/python3', '/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-install-8jj_hf2x/river_5c1dc9f218384df098e06c22f57902ef/setup.py', 'build', '-b', '/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-install-8jj_hf2x/river_5c1dc9f218384df098e06c22f57902ef/build', '--build-purelib', '/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-install-8jj_hf2x/river_5c1dc9f218384df098e06c22f57902ef/build/lib', '--build-platlib', '/private/var/folders/0b/nxx7zwbd6892znfk2t06h5n80000gn/T/pip-install-8jj_hf2x/river_5c1dc9f218384df098e06c22f57902ef/build/lib.macosx-10.9-x86_64-cpython-310']' returned non-zero exit status 1.
      [end of output]

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

from river.

hannahleblanc avatar hannahleblanc commented on June 10, 2024 1

I am getting the same error as @marinasie with Python 3.11 mac 14.3 when using pip install river. I was also running into issues installing the latest development version from github until I ran rustup target add x86_64-apple-darwin, I don't seem to be getting errors now but I haven't tried out River yet.

from river.

AdilZouitine avatar AdilZouitine commented on June 10, 2024

Hey, Could you provide a minimal reproducible example, please? With your system information?

from river.

marinasie avatar marinasie commented on June 10, 2024

I am encountering the same problem with macOS 14.4.1. Steps to reproduce: pip install river

from river.

MaxHalford avatar MaxHalford commented on June 10, 2024

I'm sorry to hear that @marinasie. I'm on MacOS 14, Sonoma, and it's working. Could you share a traceback, including the error you obtained?

from river.

MaxHalford avatar MaxHalford commented on June 10, 2024

May I ask which Python version you're using?

from river.

marinasie avatar marinasie commented on June 10, 2024

Python 3.10.11 🐍

from river.

MaxHalford avatar MaxHalford commented on June 10, 2024

Ok super weird. Normally a pre-built wheel should be used, so you don't have to install from scratch. I asked because I see a cpython-312 in your traceback, making me think you're on Python 3.12... I'm not really sure how to help now 😅

from river.

justinuliu avatar justinuliu commented on June 10, 2024

I think there is no pre-built wheel for MacOS 14 on an Intel CPU, so Pip builds it from scratch.
I have no idea why Pip is using cpython3.12 instead of 3.9 in my case.

from river.

marinasie avatar marinasie commented on June 10, 2024

Yes, thank you @hannahleblanc !

This installation procedure solved it for me:

rustup target add x86_64-apple-darwin
pip install git+ssh://[email protected]/online-ml/river.git --upgrade  # using SSH
pip install git+https://github.com/online-ml/river --upgrade  # or alternatively run with https

Worked with python 3.10.11 and macOS 14.4.1

Now river works like a charm. 🚀

from river.

adrian-valente avatar adrian-valente commented on June 10, 2024

Hi all, same error on macOS 12.5.1 (on x86 arch), python 3.10 or 3.12 equally, that disappears when rolling back to river 0.19.0 however. The command rustup target add x86_64-apple-darwin does not do the trick for me for installing river >=0.20.0

from river.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.