You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This change
1. Change import order to supress the setuptools warning;
1. Add `zip_safe=False` so that egg installation is disabled.
By default setuptools assumes torchaudio is zip-safe and `python setup.py install`
performs egg installation, which causes script module load failure.
Making `zip_safe=False` force installation to copy the whole directory structure to
the target directory.
https://setuptools.readthedocs.io/en/latest/setuptools.html#setting-the-zip-safe-flag
**Warning
```
site-packages/setuptools/distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
```
** Import failure when installed with `python setup.py install`
```
import torchaudio
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 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/torchaudio/envs/master-py3.6/lib/python3.6/site-packages/torchaudio-0.7.0a0+d6831c6-py3.6-linux-x86_64.egg/torchaudio/__init__.py", line 1, in <module>
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 656, in _load_unlocked
File "<frozen importlib._bootstrap>", line 626, in _load_backward_compatible
File "/torchaudio/envs/master-py3.6/lib/python3.6/site-packages/torchaudio-0.7.0a0+d6831c6-py3.6-linux-x86_64.egg/torchaudio/extension/__init__.py", line 5, in <module>
File "/torchaudio/envs/master-py3.6/lib/python3.6/site-packages/torchaudio-0.7.0a0+d6831c6-py3.6-linux-x86_64.egg/torchaudio/extension/extension.py", line 12, in _init_extension
File "/torchaudio/envs/master-py3.6/lib/python3.6/site-packages/torchaudio-0.7.0a0+d6831c6-py3.6-linux-x86_64.egg/torchaudio/extension/extension.py", line 19, in _init_script_module
File "/torchaudio/envs/master-py3.6/lib/python3.6/site-packages/torch/_classes.py", line 46, in load_library
torch.ops.load_library(path)
File "/torchaudio/envs/master-py3.6/lib/python3.6/site-packages/torch/_ops.py", line 105, in load_library
ctypes.CDLL(path)
File "/torchaudio/envs/master-py3.6/lib/python3.6/ctypes/__init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /torchaudio/envs/master-py3.6/lib/python3.6/site-packages/torchaudio-0.7.0a0+d6831c6-py3.6-linux-x86_64.egg/torchaudio/_torchaudio.py
```
0 commit comments