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

Linux install issues #242

Closed
MatteoSid opened this issue May 10, 2023 · 8 comments
Closed

Linux install issues #242

MatteoSid opened this issue May 10, 2023 · 8 comments

Comments

@MatteoSid
Copy link

I tried to follow the instruction for use the whisperX in my python code but I have compatibility issues during the dependency installation.

I'm creating a python env with:
python3.10 -m venv venv

Upgrading pip with:
pip install --upgrade pip

Installing torch with:
pip3 install torch torchvision torchaudio
that install the packages:

  • torch==2.0.1
  • torchaudio==2.0.2
  • torchvision==0.15.2

Them I install whisperX with:
pip install git+https://github.com/m-bain/whisperx.git
that gave me this error:

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.
torchvision 0.15.2 requires torch==2.0.1, but you have torch 2.0.0 which is incompatible.

And if I try to use whisperX I have this error:
ModuleNotFoundError: No module named 'lightning_fabric'

Maybe there is some issue whith the requirements?

@gobbledygoober
Copy link

In this comment from #237 a user describes using conda (better dependency resolution than pip) and a modification of requirements.txt to address this.

That said, using a clean python 3.10 conda env, I was able to install v3 on Linux without any additional/manual changes.

@MatteoSid
Copy link
Author

MatteoSid commented May 10, 2023

I saw that comment and I have already tried using that method but it doesen't work for me.

I clone the repo with:
git clone https://github.com/m-bain/whisperX.git
but I can't import whisper in my code because i have this error:
ModuleNotFoundError: No module named 'lightning_fabric'
And if I try to install this package manually I have this error when I import whisper:
ValueError: 1.8.0rc0 is not valid SemVer string

And at the moment I am forced to use pip instead of conda.

But I can't understand why the instructions says to manually install torch if the requirements.txt has torch too.

@PabloSergi
Copy link

PabloSergi commented May 12, 2023

I tried to follow the instruction for use the whisperX in my python code but I have compatibility issues during the dependency installation.

I'm creating a python env with: python3.10 -m venv venv

Upgrading pip with: pip install --upgrade pip

Installing torch with: pip3 install torch torchvision torchaudio that install the packages:

  • torch==2.0.1
  • torchaudio==2.0.2
  • torchvision==0.15.2

Them I install whisperX with: pip install git+https://github.com/m-bain/whisperx.git that gave me this error:

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.
torchvision 0.15.2 requires torch==2.0.1, but you have torch 2.0.0 which is incompatible.

And if I try to use whisperX I have this error: ModuleNotFoundError: No module named 'lightning_fabric'

Maybe there is some issue whith the requirements?

did you tried another version of torch? i got this error during last install, may be ur problems cas of this too: 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.
torchaudio 2.0.1 requires torch==2.0.0, but you have torch 2.0.1 which is incompatible.
whisperx 3.1.0 requires torch==2.0.0, but you have torch 2.0.1 which is incompatible. I mean, just did u tried to install torch 2.0.0?

@m-bain
Copy link
Owner

m-bain commented May 13, 2023

Sorry yes only torch 2.0.0 is working right now

Any of the following:
https://pytorch.org/get-started/previous-versions/#v200

@rockmor
Copy link

rockmor commented May 13, 2023

I am getting the same error now when trying to run v.3.1.1 (on Windows).

Traceback (most recent call last):
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\Scripts\whisperx.exe\__main__.py", line 4, in <module>
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\lib\site-packages\whisperx\__init__.py", line 1, in <module>
    from .transcribe import load_model
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\lib\site-packages\whisperx\transcribe.py", line 10, in <module>
    from .asr import load_model
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\lib\site-packages\whisperx\asr.py", line 13, in <module>
    from .vad import load_vad_model, merge_chunks
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\lib\site-packages\whisperx\vad.py", line 9, in <module>
    from pyannote.audio import Model
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\lib\site-packages\pyannote\audio\__init__.py", line 29, in <module>
    from .core.inference import Inference
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\lib\site-packages\pyannote\audio\core\inference.py", line 35, in <module>
    from pyannote.audio.core.model import Model
  File "C:\Users\bakashinji\AppData\Local\Programs\Python\Python310\lib\site-packages\pyannote\audio\core\model.py", line 38, in <module>
    from lightning_fabric.utilities.cloud_io import _load as pl_load
ModuleNotFoundError: No module named 'lightning_fabric'

UPD: https://github.com/m-bain/whisperX/issues/237#issuecomment-1541564485 helped, though I also had to install chardet.

@dustonmouse
Copy link

This code works for me

!pip install torch==2.0.0+cu117 torchvision==0.15.1+cu117 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu117

import locale
def getpreferredencoding(do_setlocale = True):
    return "UTF-8"
locale.getpreferredencoding = getpreferredencoding  

@Ace-myu
Copy link

Ace-myu commented Jan 9, 2024

Any updated solution on this? I am experiencing the exact same issue. I have the cpu only version of torch installed, not sure if that's the cause.

@ZubairKhan001
Copy link

If you have installed Pytorch lightning version v2.0.0 or above, update your import statement

pip install pytorch-lightning==2.0.0

from lightning_fabric.utilities.seed import seed_everything

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

9 participants