Skip to content

Commit

Permalink
Set zip_safe = False
Browse files Browse the repository at this point in the history
Currently `setuptools` assumes that torhcaudio is zip safe and performs
egg (zip) installation when `python setup.py install` (or `pip install .`).

Torchaudio checks module (C++ extension) availavility dynamically at runtime,
using importlib, and egg installation does not work well with this. (importlib
cannot find C++ extension with egg installation even though it exists)

An workaround for this is to set zip_safe=False in setup.py and disable egg
installation, so that `python setup.py install` installs uncompressed files
with regular directory structure.
  • Loading branch information
mthrok committed Aug 4, 2020
1 parent 11b00d5 commit e33bbbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,6 @@ def run(self):
cmdclass={
'build_ext': setup_helpers.BuildExtension.with_options(no_python_abi_suffix=True)
},
install_requires=[pytorch_package_dep]
install_requires=[pytorch_package_dep],
zip_safe=False,
)

0 comments on commit e33bbbb

Please sign in to comment.