Skip to content
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

Conflicting requirements from source on Mac #8

Open
dennislysenko opened this issue Feb 21, 2024 · 4 comments
Open

Conflicting requirements from source on Mac #8

dennislysenko opened this issue Feb 21, 2024 · 4 comments

Comments

@dennislysenko
Copy link

Hi, cool project 👋

I found that I can't set up the requirements on MacOS from source.

When I use Python3.10:

ERROR: Cannot install -r requirements.txt (line 5) and tensorflow because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested tensorflow
    spleeter 2.4.0 depends on tensorflow<2.10.0 and >=2.5.0
    tensorflow-macos 2.13.0 depends on numpy<=1.24.3 and >=1.22
    spleeter 2.1.0 depends on numpy<1.19.0 and >=1.16.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

When I use Python 3.11, there's a big cython error when installing numpy:

Collecting numpy<1.19.0,>=1.16.0 (from spleeter->-r requirements.txt (line 5))
  Using cached numpy-1.18.5.zip (5.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [56 lines of output]
      Running from numpy source directory.
      <string>:461: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
      /private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-install-nt_0wr0y/numpy_02f5ae1486dc44b2ba94548df21efc4e/tools/cythonize.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        required_version = LooseVersion('0.29.14')
      /private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-install-nt_0wr0y/numpy_02f5ae1486dc44b2ba94548df21efc4e/tools/cythonize.py:77: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        if LooseVersion(cython_version) < required_version:

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
                  self.rng_state.ctr.v[i] = counter[i]

              self._reset_state_variables()

              self._bitgen.state = <void *>&self.rng_state
              self._bitgen.next_uint64 = &philox_uint64
                                         ^
      ------------------------------------------------------------

      _philox.pyx:195:35: Cannot assign type 'uint64_t (*)(void *) except? -1 nogil' to 'uint64_t (*)(void *) noexcept nogil'. Exception values are incompatible. Suggest adding 'noexcept' to type 'uint64_t (void *) except? -1 nogil'.
      Processing numpy/random/_bounded_integers.pxd.in
      Processing numpy/random/_philox.pyx
      Traceback (most recent call last):
        File "/private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-install-nt_0wr0y/numpy_02f5ae1486dc44b2ba94548df21efc4e/tools/cythonize.py", line 238, in <module>
          main()
        File "/private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-install-nt_0wr0y/numpy_02f5ae1486dc44b2ba94548df21efc4e/tools/cythonize.py", line 234, in main
          find_process_files(root_dir)
        File "/private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-install-nt_0wr0y/numpy_02f5ae1486dc44b2ba94548df21efc4e/tools/cythonize.py", line 225, in find_process_files
          process(root_dir, fromfile, tofile, function, hash_db)
        File "/private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-install-nt_0wr0y/numpy_02f5ae1486dc44b2ba94548df21efc4e/tools/cythonize.py", line 191, in process
          processor_function(fromfile, tofile)
        File "/private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-install-nt_0wr0y/numpy_02f5ae1486dc44b2ba94548df21efc4e/tools/cythonize.py", line 80, in process_pyx
          subprocess.check_call(
        File "/opt/homebrew/Cellar/[email protected]/3.11.6/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 413, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/Users/dennis/Downloads/vocal-separate/.venv/bin/python3.11', '-m', 'cython', '-3', '--fast-fail', '-o', '_philox.c', '_philox.pyx']' returned non-zero exit status 1.
      Cythonizing sources
      Traceback (most recent call last):
        File "/Users/dennis/Downloads/vocal-separate/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/dennis/Downloads/vocal-separate/.venv/lib/python3.11/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/dennis/Downloads/vocal-separate/.venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-build-env-kbjmn8zs/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-build-env-kbjmn8zs/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/var/folders/sd/n5539dfn4kd9ck001x3_p1240000gn/T/pip-build-env-kbjmn8zs/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 488, in <module>
        File "<string>", line 469, in setup_package
        File "<string>", line 275, in generate_cython
      RuntimeError: Running cythonize failed!
      [end of output]

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

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Seems like something mac specific. Any suggestions how I can get the packages set up? Looks like the 3.10 case might be easier since the packages simply conflict instead of weird C errors.

@jianchang512
Copy link
Owner

  1. python 3.10.x
  2. pip install -r requirements.txt --no-deps

@PaulZhang123
Copy link

I use Python 3.11 , pip3 install numpy , have the same problems

@jianchang512
Copy link
Owner

pip install -r requirements.txt --no-deps

@onthedesk
Copy link

python 3.10

flask==2.0.3
Werkzeug>=2.0,<3.0
requests==2.32.3
gevent==24.2.1
tensorflow==2.9.3
spleeter==2.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants