$ pip install hydra Collecting hydra Downloading Hydra-2.5.tar.gz (82 kB)…
- User
$ pip install hydra Collecting hydra Downloading Hydra-2.5.tar.gz (82 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 82.4/82.4 kB 1.0 MB/s eta 0:00:00 Preparing metadata (setup.py) ... done Building wheels for collected packages: hydra Building wheel for hydra (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-311 copying src/hydra.py -> build/lib.linux-x86_64-cpython-311 running build_ext building '_hydra' extension creating build/temp.linux-x86_64-cpython-311 creating build/temp.linux-x86_64-cpython-311/src x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-install-0mfyyidn/hydra_1e051afd75634331aa607123854f2ae6/src -I/cs/labs/oabend/shachar.don/halo_env/include -I/usr/include/python3.11 -c src/MurmurHash3.c -o build/temp.linux-x86_64-cpython-311/src/MurmurHash3.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-install-0mfyyidn/hydra_1e051afd75634331aa607123854f2ae6/src -I/cs/labs/oabend/shachar.don/halo_env/include -I/usr/include/python3.11 -c src/_hydra.c -o build/temp.linux-x86_64-cpython-311/src/_hydra.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE src/_hydra.c:61:12: fatal error: longintrepr.h: No such file or directory 61 | #include "longintrepr.h" | ^~~~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for hydra Running setup.py clean for hydra Failed to build hydra Installing collected packages: hydra Running setup.py install for hydra ... error error: subprocess-exited-with-error
× Running setup.py install for hydra did not run successfully. │ exit code: 1 ╰─> [19 lines of output] running install /usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build/lib.linux-x86_64-cpython-311 copying src/hydra.py -> build/lib.linux-x86_64-cpython-311 running build_ext building '_hydra' extension creating build/temp.linux-x86_64-cpython-311 creating build/temp.linux-x86_64-cpython-311/src x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-install-0mfyyidn/hydra_1e051afd75634331aa607123854f2ae6/src -I/cs/labs/oabend/shachar.don/halo_env/include -I/usr/include/python3.11 -c src/MurmurHash3.c -o build/temp.linux-x86_64-cpython-311/src/MurmurHash3.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-install-0mfyyidn/hydra_1e051afd75634331aa607123854f2ae6/src -I/cs/labs/oabend/shachar.don/halo_env/include -I/usr/include/python3.11 -c src/_hydra.c -o build/temp.linux-x86_64-cpython-311/src/_hydra.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE src/_hydra.c:61:12: fatal error: longintrepr.h: No such file or directory 61 | #include "longintrepr.h" | ^~~~~~~~~~~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 [end of output]
- Assistant
It looks like you're trying to install hydra, but there are a few possible issues:
Wrong Package:
The package you're installing (hydra) is likely not the one you need.
If you're looking for Hydra from Facebook AI, the correct package is hydra-core, not hydra.
Try: bashCopyEditpip install hydra-core
Missing Dependencies:
The error about longintrepr.h missing suggests that you might need development headers for Python.
Try installing them using: bashCopyEditsudo apt-get install python3-dev
Use a Virtual Environment (if not already):
Run: bashCopyEditpython3 -m venv hydra_env source hydra_env/bin/activate pip install hydra-core
Let me know if you're installing a different hydra package!