Skip to content

Exception at 'import torchaudio' #1

@felixkreuk

Description

@felixkreuk

Hi,
I am trying to use torchaudio on Ubuntu and get the following exception:

>>> import torchaudio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "torchaudio/__init__.py", line 5, in <module>
    from ._ext import th_sox
  File "torchaudio/_ext/th_sox/__init__.py", line 3, in <module>
    from ._th_sox import lib as _lib, ffi as _ffi
ImportError: No module named _th_soxq

All dependencies are met and up-to-date:

libsox-dev is already the newest version.
libsox-fmt-all is already the newest version.
sox is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 196 not upgraded.

Also, install process seems ok, no errors or warnings:

running install
running bdist_egg
running egg_info
writing requirements to torchaudio.egg-info/requires.txt
writing torchaudio.egg-info/PKG-INFO
writing top-level names to torchaudio.egg-info/top_level.txt
writing dependency_links to torchaudio.egg-info/dependency_links.txt
reading manifest file 'torchaudio.egg-info/SOURCES.txt'
writing manifest file 'torchaudio.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
copying torchaudio/_ext/th_sox/__init__.py -> build/lib.linux-x86_64-2.7/torchaudio/_ext/th_sox
running build_ext
generating cffi module 'build/temp.linux-x86_64-2.7/torchaudio._ext._th_sox.c'
already up-to-date
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/torchaudio
creating build/bdist.linux-x86_64/egg/torchaudio/_ext
creating build/bdist.linux-x86_64/egg/torchaudio/_ext/th_sox
copying build/lib.linux-x86_64-2.7/torchaudio/_ext/th_sox/__init__.py -> build/bdist.linux-x86_64/egg/torchaudio/_ext/th_sox
copying build/lib.linux-x86_64-2.7/torchaudio/_ext/_th_sox.so -> build/bdist.linux-x86_64/egg/torchaudio/_ext
copying build/lib.linux-x86_64-2.7/torchaudio/_ext/__init__.py -> build/bdist.linux-x86_64/egg/torchaudio/_ext
copying build/lib.linux-x86_64-2.7/torchaudio/__init__.py -> build/bdist.linux-x86_64/egg/torchaudio
byte-compiling build/bdist.linux-x86_64/egg/torchaudio/_ext/th_sox/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/torchaudio/_ext/__init__.py to __init__.pyc
byte-compiling build/bdist.linux-x86_64/egg/torchaudio/__init__.py to __init__.pyc
creating stub loader for torchaudio/_ext/_th_sox.so
byte-compiling build/bdist.linux-x86_64/egg/torchaudio/_ext/_th_sox.py to _th_sox.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying torchaudio.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchaudio.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchaudio.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchaudio.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying torchaudio.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
zip_safe flag not set; analyzing archive contents...
creating 'dist/torchaudio-0.1-py2.7-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing torchaudio-0.1-py2.7-linux-x86_64.egg
Removing /usr/local/lib/python2.7/dist-packages/torchaudio-0.1-py2.7-linux-x86_64.egg
Copying torchaudio-0.1-py2.7-linux-x86_64.egg to /usr/local/lib/python2.7/dist-packages
torchaudio 0.1 is already the active version in easy-install.pth

Installed /usr/local/lib/python2.7/dist-packages/torchaudio-0.1-py2.7-linux-x86_64.egg
Processing dependencies for torchaudio==0.1
Searching for cffi==1.10.0
Best match: cffi 1.10.0
Adding cffi 1.10.0 to easy-install.pth file

Using /usr/local/lib/python2.7/dist-packages
Searching for pycparser==2.17
Best match: pycparser 2.17
Adding pycparser 2.17 to easy-install.pth file

Using /usr/local/lib/python2.7/dist-packages
Finished processing dependencies for torchaudio==0.1

Any idea what went wrong?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions