django-deepspeech-server icon indicating copy to clipboard operation
django-deepspeech-server copied to clipboard

Python version problem

Open TarikTz opened this issue 7 years ago • 7 comments

I'm having a problem with running your server. Deepspeech requires python 2.7 and your script is working on python 3. So when I run python3 I always get ModuleNotFoundError: No module named '_model'

And if I run just python (I'm using virtual environment for this) after running from deepspeech.model import Module no errors are displayed.

Any idea what I'm doing wrong?

TarikTz avatar Feb 22 '18 13:02 TarikTz

There are deepspeech bindings for python3 as well. You can try that if you only want to do inference.

ashwan1 avatar Feb 23 '18 05:02 ashwan1

Any idea how to create that? I've tried pip3 install deepspeech and get it in pip list but still no luck running this server.

TarikTz avatar Feb 23 '18 07:02 TarikTz

If you installed deepspeech using pip3, it should download correct bindings. Can you please create fresh virtual env and install deepspeech using pip3. Then try to do inference using terminal as mentioned in deepspeech readme.

ashwan1 avatar Feb 23 '18 11:02 ashwan1

@TarikTz , any updates on this. Were you able to run deepspeech server?

ashwan1 avatar Feb 26 '18 09:02 ashwan1

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7efbfffedea0>
Traceback (most recent call last):
  File "/production/deepspeech/deepspeech-venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
  File "/production/deepspeech/deepspeech-venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 113, in inner_run
autoreload.raise_last_exception()
  File "/production/deepspeech/deepspeech-venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 248, in raise_last_exception
raise _exception[1]
  File "/production/deepspeech/deepspeech-venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 327, in execute
autoreload.check_errors(django.setup)()
  File "/production/deepspeech/deepspeech-venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
  File "/production/deepspeech/deepspeech-venv/lib/python3.6/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
  File "/production/deepspeech/deepspeech-venv/lib/python3.6/site-packages/django/apps/registry.py", line 89, in populate
app_config = AppConfig.create(entry)
  File "/production/deepspeech/deepspeech-venv/lib/python3.6/site-packages/django/apps/config.py", line 116, in create
mod = import_module(mod_path)
  File "/production/deepspeech/deepspeech-venv/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/production/deepspeech/django-deepspeech-server/speech_server_main/apps.py", line 2, in         <module>
    from deepspeech.model import Model
ModuleNotFoundError: No module named 'deepspeech.model'

Python version 3.6.6

netsafe avatar Sep 30 '18 12:09 netsafe

@netsafe Can you please check after pulling new changes.

ashwan1 avatar Oct 10 '18 08:10 ashwan1

Configming - I've made these fixes and added some new things, but it should be OK to run it

netsafe avatar Oct 10 '18 12:10 netsafe