Comments (15)
I ran into the same error on macos + homebrew + python 3.12
It looks like python 3.12 (and pip) removed ImpImporter: https://stackoverflow.com/a/77364602
The error also seems to be a transitive dependency on numpy 1.23 included from nemo_toolkit? Numpy 1.26 might fix it?
Collecting numpy<1.24,>=1.22 (from nemo_toolkit!=1.22.0,!=1.23.0->nemo_toolkit[asr]!=1.22.0,!=1.23.0->-r requirements.txt (line 2))
...
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
I was able to install using python 3.11 (installed via homebrew) with the following steps:
python3.11 -m venv venv
source venv/bin/activate
pip install --upgrade Cython setuptools wheel
pip install -r requirements.txt
from whisper-diarization.
Should be solved now
from whisper-diarization.
Cloned the updated repo and installed requirements, this time I encountered this error:-
Running setup.py install for ctc-forced-aligner ... error
error: subprocess-exited-with-error
× Running setup.py install for ctc-forced-aligner did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-req-build-l_it1chw/setup.py", line 2, in <module>
from torch.utils import cpp_extension
File "/home/ubuntu/anshuman/sd/env/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 28, in <module>
from pkg_resources import packaging # type: ignore[attr-defined]
ImportError: cannot import name 'packaging' from 'pkg_resources' (/home/ubuntu/anshuman/sd/env/lib/python3.10/site-packages/pkg_resources/__init__.py)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> ctc-forced-aligner
I am using python 3.10.12.
from whisper-diarization.
update setuptools
pip install setuptools -U --force-reinstall
from whisper-diarization.
from whisper-diarization.
@mjcarag the stack trace is not complete, please share it as a text
from whisper-diarization.
Please see error encountered:
ERROR: Exception:
Traceback (most recent call last):
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\cli\base_command.py", line 179, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\cli\req_command.py", line 67, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\commands\install.py", line 377, in run
requirement_set = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 95, in resolve
result = self._result = resolver.resolve(
^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 546, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 427, in resolve
failure_causes = self._attempt_to_pin_criterion(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 239, in _attempt_to_pin_criterion
criteria = self._get_updated_criteria(candidate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 230, in _get_updated_criteria
self._add_to_criteria(criteria, requirement, parent=candidate)
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
if not criterion.candidates:
^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\resolvelib\structs.py", line 156, in bool
return bool(self._sequence)
^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 174, in bool
return any(self)
^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 162, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 53, in _iter_built
candidate = func()
^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 185, in _make_candidate_from_link
base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 231, in _make_base_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 303, in init
super().init(
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 158, in init
self.dist = self._prepare()
^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 235, in _prepare
dist = self._prepare_distribution()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 314, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\operations\prepare.py", line 527, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\operations\prepare.py", line 642, in _prepare_linked_requirement
dist = _get_prepared_distribution(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\operations\prepare.py", line 72, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\distributions\sdist.py", line 56, in prepare_distribution_metadata
self._install_build_reqs(finder)
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\distributions\sdist.py", line 126, in _install_build_reqs
build_reqs = self._get_build_requires_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\distributions\sdist.py", line 103, in _get_build_requires_wheel
return backend.get_requires_for_build_wheel()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_internal\utils\misc.py", line 709, in get_requires_for_build_wheel
return super().get_requires_for_build_wheel(config_settings=cs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 166, in get_requires_for_build_wheel
return self._call_hook('get_requires_for_build_wheel', {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\pyproject_hooks_impl.py", line 321, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 77, in build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\AppData\Local\Programs\Python\Python312\Lib\importlib_init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in call_with_frames_removed
File "C:\Users\PC\AppData\Local\Temp\pip-build-env-b565xk92\overlay\Lib\site-packages\setuptools_init.py", line 10, in
import distutils.core
ModuleNotFoundError: No module named 'distutils'
from whisper-diarization.
pip install distutils
from whisper-diarization.
ERROR: Could not find a version that satisfies the requirement distutils (from versions: none)
ERROR: No matching distribution found for distutils
am having this error when trying to pip install distutils
tried to pip install setuptools and got different error
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [33 lines of output]
Traceback (most recent call last):
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
^^^^^^^^^^^^^^^^
File "D:\Office Works\VSC\whisper-diarization-main\myenv\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 77, in build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\PC\AppData\Local\Programs\Python\Python312\Lib\importlib_init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1310, in _find_and_load_unlocked
File "", line 488, in _call_with_frames_removed
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "C:\Users\PC\AppData\Local\Temp\pip-build-env-5213r1q\overlay\Lib\site-packages\setuptools_init.py", line 16, in
import setuptools.version
File "C:\Users\PC\AppData\Local\Temp\pip-build-env-_5213r1q\overlay\Lib\site-packages\setuptools\version.py", line 1, in
import pkg_resources
File "C:\Users\PC\AppData\Local\Temp\pip-build-env-5213r1q\overlay\Lib\site-packages\pkg_resources_init.py", line 2172, in
register_finder(pkgutil.ImpImporter, find_on_path)
^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
from whisper-diarization.
I also get the module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'? error
Python 3.9
from whisper-diarization.
pip install --upgrade pip setuptools
from whisper-diarization.
I have tried
python -m pip install --upgrade pip setuptools wheel
python -m pip install numpy==1.23.5
python -m pip cache purge
del /q /f /s %temp%*
conda update conda
conda update -c conda-forge --all
from whisper-diarization.
I don't know unfortunately, maybe try again with a clean environment
from whisper-diarization.
I also did
from whisper-diarization.
I'm using ubuntu 22.04 from the microsoft store on Windows 11. Here is the bash script that I put together. This got everything working seamlessly as of August 2024.
#!/bin/bash
# Create a new conda environment
conda create -n whisper_diar2 python=3.10 --yes
# Initialize conda and activate the new environment
source ~/miniconda3/etc/profile.d/conda.sh
conda activate whisper_diar2
# Upgrade pip
pip install --upgrade pip
# Install JupyterLab and IPython kernel
conda install -c conda-forge jupyterlab --yes
conda install ipykernel --yes
python -m ipykernel install --user --name whisper_diar2 --display-name "whisper_diar2"
# Reinstall PyTorch with CUDA support
#pip uninstall torch --yes
#conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia --yes
# Install Cython and FFmpeg
#pip install cython
sudo apt update && sudo apt install -y cython3 ffmpeg
# https://github.com/MahmoudAshraf97/whisper-diarization/issues/188#issuecomment-2277862623
pip install --upgrade Cython setuptools wheel
# Install other required Python packages
pip install -r requirements.txt
# Install Nemo toolkit (you can modify the version if needed)
pip install nemo_toolkit==1.18.1
# notebook pip installs
pip install git+https://github.com/m-bain/whisperX.git@78dcfaab51005aa703ee21375f81ed31bc248560
pip install --no-build-isolation nemo_toolkit[asr]==1.23.0
pip install --no-deps git+https://github.com/facebookresearch/demucs#egg=demucs
pip install git+https://github.com/oliverguhr/deepmultilingualpunctuation.git
pip install git+https://github.com/MahmoudAshraf97/ctc-forced-aligner.git
# https://github.com/MahmoudAshraf97/whisper-diarization/issues/202
pip uninstall huggingface_hub --yes
pip install huggingface-hub==0.20.3
echo "Installation complete. The environment 'whisper_diar2' is set up and ready to use."
from whisper-diarization.
Related Issues (20)
- What is the maximum audio file that can be sent for execution? HOT 5
- Output format HOT 3
- from .ctc_forced_aligner import forced_align as forced_align_cpp error HOT 3
- CTC forced alignment error HOT 10
- multiple speaker compatability HOT 16
- IndexError: list index out of range HOT 3
- TypeError: unsupported operand type(s) for |: 'type' and 'type' HOT 4
- No such file or directory: '/usr/local/lib/python3.10/dist-packages/ctc_forced_aligner/punctuations.lst' HOT 1
- Installation issues with Windows HOT 4
- separating tracks killed HOT 2
- "Permission denied" HOT 6
- ContextualVersionConflict / Could not find the operator torchvision::nms HOT 5
- ubuntu pip install issue HOT 2
- Doesn't it provide Diarization for Korean? HOT 2
- Installed without any issues, received this error when trying to run. HOT 7
- Cannot import name 'ModelFilter' from 'huggingface_hub' HOT 5
- ModuleNotFoundError: No module named 'numpy' HOT 4
- Additional punctuation support HOT 2
- Some errors occurred during Speaker Diarization using the NeMo MSDD Model HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whisper-diarization.