huggingsound icon indicating copy to clipboard operation
huggingsound copied to clipboard

Trouble with installation

Open AntonioBuccola opened this issue 2 years ago • 9 comments

Hi, the title explains the issue I am encountering. Running pip install huggingsound on python 3.7 does not work. I am working on a clean conda environment using python 3.7 on a AWS instance. The problem seems to be (up to now) the python-Levehnstein module.

Building wheel for python-Levenshtein (setup.py) ... error

and then it prints quite an amount of red lines. The final ones are:

ERROR: Command errored out with exit status 1: /opt/conda/envs/lm_asr/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4k9a6e70/python-levenshtein_fac72c8f097c43cca31ab0f413816b09/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4k9a6e70/python-levenshtein_fac72c8f097c43cca31ab0f413816b09/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-qum2of9f/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/envs/lm_asr/include/python3.7m/python-Levenshtein Check the logs for full command output.

Thanks in advance for your attention.

AntonioBuccola avatar Feb 25 '22 14:02 AntonioBuccola

I'm having the same error, did you solve it?

ireneb612 avatar Mar 21 '22 15:03 ireneb612

I'm having the same error, did you solve it?

Unfortunately no. I hope the developer can answer.

AntonioBuccola avatar Mar 28 '22 09:03 AntonioBuccola

To be honest, I don't know what's happening in your environment :(

Have you tried installing the python-levenshtein manually? pip install python-levenshtein

jonatasgrosman avatar Mar 28 '22 16:03 jonatasgrosman

To be honest, I don't know what's happening in your environment :(

Have you tried installing the python-levenshtein manually? pip install python-levenshtein

Hi, yes, I tried but it gave me the same error.

AntonioBuccola avatar Apr 04 '22 13:04 AntonioBuccola

I've found a stackoverflow issue answered by some of the python-levenshtein maintainers that may help you with this issue:

https://stackoverflow.com/questions/32595050/sudo-pip-install-python-levenshtein-failed-with-error-code-1

... and there's another one:

https://stackoverflow.com/questions/65571031/python-levenshtein-library-install-error-on-macos

It seems that may some libraries required for the python-levenshtein installation are missing in your environment

jonatasgrosman avatar Apr 04 '22 20:04 jonatasgrosman

Thanks for the reply, as soon as I can go back to this work I will post a replay and, eventually, give you a feedback. Unfortunately, in this period I could not dive properly in this project due to other scheduled work. Thanks again!

AntonioBuccola avatar Apr 12 '22 08:04 AntonioBuccola

clone and run these commands its works if you have default python 3.6 and using conda for python 3.7

git clone -b legacy_py3.6 https://github.com/QUVA-Lab/e2cnn.git cd e2cnn python setup.py install

ibtehajali67 avatar Apr 22 '22 08:04 ibtehajali67

I am also having installation issues on a mac M1 chip. I faced similar problems for the installation of tensorflow (which is a complete nightmare) but these seem odd to me.

I am working on a virtual environment using python 3.9 and the intallation via pip seems to be occuring nicely. However, when I try to import the package I receive the following error message:

raise RuntimeError(
RuntimeError: Failed to import transformers.training_args because of the following error (look up to see its traceback):
dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tensorflow/python/platform/../../core/platform/
_cpu_feature_guard.so, 0x0006): tried: '/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/tensorflow/pyt
hon/platform/../../core/platform/_cpu_feature_guard.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_6
4')), '/usr/lib/_cpu_feature_guard.so' (no such file), '/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-package
s/tensorflow/core/platform/_cpu_feature_guard.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')),
'/usr/lib/_cpu_feature_guard.so' (no such file)

I don't know if this is related to the architecture of the terminal (seems to indicate that I need x86_64) , which I tried to change but without success.

Any hints on why this might be happening?

luisignaciomenendez avatar Apr 26 '22 08:04 luisignaciomenendez

Hi, @luisignaciomenendez. I think this issue is related to the TensorFlow installation on your Mac indeed. I had that kind of problem in the past with many libraries that use TensorFlow or PyTorch. I couldn't find a way to fix those issues and gave up on using my M1 to run my ML codes. I think in the future, the M1 chips will have better support for that, but today (as you said), it's a nightmare to use most of the ML libraries on those M1 chips :/

jonatasgrosman avatar May 11 '22 15:05 jonatasgrosman