View previous topic :: View next topic |
Author |
Message |
allan n00b
Joined: 24 Feb 2003 Posts: 48 Location: Ann Arbor,Michigan
|
Posted: Sat Oct 12, 2024 11:56 pm Post subject: Python module not found despite being installed. |
|
|
I'm trying to install vosk_autosrt ( https://github.com/botbahlul/vosk_autosrt ) to generate subtitles for some videos.
I setup a virtual environment to install it into:
Code: | python -m venv ./vosk_autosrt |
Then I activated the environment and run the install command:
Code: | cd vosk_autosrt
source bin/activate
pip install vosk_autosrt
|
But the install fails with this error:
Code: | Collecting vosk_autosrt
Using cached vosk_autosrt-0.1.7.tar.gz (21.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [26 lines of output]
/tmp/pip-install-f0jvlqqb/vosk-autosrt_c447e9e93ea64378aefad19f6e233e78/vosk_autosrt/__init__.py:2036: SyntaxWarning: invalid escape sequence '\:'
scale_switch = "'trunc(iw/2)*2'\:'trunc(ih/2)*2'"
/tmp/pip-install-f0jvlqqb/vosk-autosrt_c447e9e93ea64378aefad19f6e233e78/vosk_autosrt/__init__.py:2686: SyntaxWarning: invalid escape sequence '\:'
scale_switch = "'trunc(iw/2)*2'\:'trunc(ih/2)*2'"
Traceback (most recent call last):
File "/home/xxxxx/vosk_autosrt/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/xxxxx/vosk_autosrt/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 "/home/xxxxx/vosk_autosrt/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 "/tmp/pip-build-env-moiix8ly/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-moiix8ly/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
self.run_setup()
File "/tmp/pip-build-env-moiix8ly/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 503, in run_setup
super().run_setup(setup_script=setup_script)
File "/tmp/pip-build-env-moiix8ly/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
exec(code, locals())
File "<string>", line 18, in <module>
File "/tmp/pip-install-f0jvlqqb/vosk-autosrt_c447e9e93ea64378aefad19f6e233e78/vosk_autosrt/__init__.py", line 12, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
[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.
|
After extensive googling, I verified that I only have one version of python installed (version 3.12), and that the output of pip list shows that the module is installed in the virtual environment.
Code: | Package Version
------------------ ---------
certifi 2024.8.30
cffi 1.17.1
chardet 5.2.0
charset-normalizer 3.3.2
idna 3.10
pip 24.2
progressbar2 4.5.0
pycparser 2.22
pysrt 1.1.2
python-utils 3.9.0
requests 2.32.3
six 1.16.0
sounddevice 0.5.0
srt 3.5.3
tqdm 4.66.5
typing_extensions 4.12.2
urllib3 2.2.3
vosk 0.3.45
websockets 13.1
wheel 0.44.0
|
I also tried adding the virtual environment's bin and lib directories to the PATH, which was suggested on a couple of sites, but that didn't help.
Does anyone have any thoughts on how I can resolve this? |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 314 Location: Somewhere in the 77
|
|
Back to top |
|
|
bstaletic Guru
Joined: 05 Apr 2014 Posts: 407
|
Posted: Sun Oct 13, 2024 9:03 am Post subject: |
|
|
Unlike you, I got the error that audioop is missing. That package actually does not exist.
Besides the README, the package does not seem maintained. Or even used for that matter.
The git history does not inspire confidence in the developer either.
The actual repository contains things like libgcc_s_seh-1.dll and a bunch of other libraries that should either be compiled, or come with your toolchain.
LICENSE says that's an MIT licensed project, except most of it is distributed a git-versioned dynamic library, and not in the format that cpython extension modules are in.
I would not trust that project. |
|
Back to top |
|
|
eschwartz Developer
Joined: 29 Oct 2023 Posts: 240
|
Posted: Mon Oct 14, 2024 3:31 am Post subject: Re: Python module not found despite being installed. |
|
|
allan wrote: |
After extensive googling, I verified that I only have one version of python installed (version 3.12), and that the output of pip list shows that the module is installed in the virtual environment.
|
Note that what you have installed in the virtual environment is totally irrelevant, since pip install will create *another* virtual environment, install more packages into that, and use that to build the project. It then discards that virtual environment, and adds the built copy to the first virtual environment.
This means that the project you tried to install would have to declare "requests" as one of its own build dependencies, which it probably didn't do... |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|