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

mac m1 pro - python3.12 install errors #75

Closed
tavisrudd opened this issue Nov 27, 2023 · 7 comments
Closed

mac m1 pro - python3.12 install errors #75

tavisrudd opened this issue Nov 27, 2023 · 7 comments

Comments

@tavisrudd
Copy link

Installing with python3.10 works but it appears the optimum dep's install is broken for python3.12:

> pipx install insanely-fast-whisper
Fatal error from pip prevented installation. Full pip output in file:
    /Users/tavis/.local/pipx/logs/cmd_2023-11-27_15.42.39_pip_errors.log

pip seemed to fail to build package:
    optimum

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    FileNotFoundError: [Errno 2] No such file or directory: 'optimum/version.py'
    AssertionError: Error: Could not open 'optimum/version.py' due [Errno 2] No such file or directory: 'optimum/version.py'

Error installing insanely-fast-whisper.

Snippet of cmd_2023-11-27_15.42.39_pip_errors.log:


PIP STDERR
----------
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [27 lines of output]
      Traceback (most recent call last):
        File "<string>", line 7, in <module>
      FileNotFoundError: [Errno 2] No such file or directory: 'optimum/version.py'

      During handling of the above exception, another exception occurred:

      Traceback (most recent call last):
        File "/Users/tavis/.local/pipx/shared/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/tavis/.local/pipx/shared/lib/python3.12/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/tavis/.local/pipx/shared/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/gx/5p9zxn1j6w1fc1_4rtg9t9wm0000gn/T/pip-build-env-m3rlum3k/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/gx/5p9zxn1j6w1fc1_4rtg9t9wm0000gn/T/pip-build-env-m3rlum3k/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/gx/5p9zxn1j6w1fc1_4rtg9t9wm0000gn/T/pip-build-env-m3rlum3k/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/private/var/folders/gx/5p9zxn1j6w1fc1_4rtg9t9wm0000gn/T/pip-build-env-m3rlum3k/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 10, in <module>
      AssertionError: Error: Could not open 'optimum/version.py' due [Errno 2] No such file or directory: 'optimum/version.py'

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
@Vaibhavs10
Copy link
Owner

Hey @tavisrudd - That is a known issue, Optimum has a dependency on onnxruntime which doesn't support 3.12 yet. Hence, we do not support 3.12 yet. Sorry! :(

(closing this for now, feel free to re-open.)

@bt-nia
Copy link
Contributor

bt-nia commented Nov 28, 2023

It would help to know which version is supported. I can't find it in the readme.

For anyone interested, this is the solution to install with 3.10 at least:
pipx install insanely-fast-whisper --python python3.10

@seohyunjun
Copy link

pipx install insanely-fast-whisper --python python3.11

also can work

@gabrielstuff
Copy link

Yes ! Thanks @bt-nia I confirm that on macOS, pipx install insanely-fast-whisper --python python3.10 works.

Maybe @tavisrudd we could update the doc with this detail ?

@bt-nia
Copy link
Contributor

bt-nia commented Dec 1, 2023

Status of onnxruntime: microsoft/onnxruntime#17842

@velaia
Copy link

velaia commented Dec 11, 2023

The installation worked for me with --python python3.11 but later I ran into an error when trying to run the program.

ValueError: The generation config is outdated and is thus not compatible with the language argument to generate. Either set the language using the forced_decoder_ids in the model config, or update the generation config as per the instructions huggingface/transformers#25084 (comment)

After reinstallation of insanely-fast-whisper using pipx and the argument --python python3.10 it now works.

(System M1 Mac)

@boxabirds
Copy link

I find pipx confusing. Why not use pipenv with the python version requirements built-in?

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

7 participants