facebookresearch / hydra

Hydra is a framework for elegantly configuring complex applications
https://hydra.cc
MIT License
8.77k stars 629 forks source link

[Bug] ModuleNotFoundError: No module named 'hydra.experimental'; 'hydra' is not a package #920

Closed paantya closed 4 years ago

paantya commented 4 years ago

🐛 Bug

Description

ModuleNotFoundError: No module named 'hydra.experimental'; 'hydra' is not a package

Checklist

To reproduce

from hydra.experimental import initialize, compose

    from hydra.experimental import initialize, compose
ModuleNotFoundError: No module named 'hydra.experimental'; 'hydra' is not a package

Expected Behavior

jast works

System information

Hydra: hydra-core-1.0.0rc4 OS: Ubuntu 18.04.5 LTS (x86_64) GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Clang version: Could not collect CMake version: Could not collect

Python version: 3.6 (64-bit runtime) Is CUDA available: N/A CUDA runtime version: 9.1.85 GPU models and configuration: Could not collect Nvidia driver version: Could not collect cuDNN version: Could not collect

Versions of relevant libraries: [pip3] numpy==1.19.0 [conda] Could not collect

omry commented 4 years ago

Please show pip freeze output.

paantya commented 4 years ago

@omry

(base) user@s130:~$ pip install hydra-core --upgrade --pre
Requirement already up-to-date: hydra-core in ./anaconda3/lib/python3.7/site-packages (1.0.0rc4)
Requirement already satisfied, skipping upgrade: importlib-resources; python_version < "3.9" in ./anaconda3/lib/python3.7/site-packages (from hydra-core) (3.0.0)
Requirement already satisfied, skipping upgrade: omegaconf>=2.0.1rc12 in ./anaconda3/lib/python3.7/site-packages (from hydra-core) (2.0.1rc12)
Requirement already satisfied, skipping upgrade: antlr4-python3-runtime==4.8 in ./anaconda3/lib/python3.7/site-packages (from hydra-core) (4.8)
Requirement already satisfied, skipping upgrade: zipp>=0.4; python_version < "3.8" in ./anaconda3/lib/python3.7/site-packages (from importlib-resources; python_version < "3.9"->hydra-core) (3.1.0)
Requirement already satisfied, skipping upgrade: PyYAML>=5.1.* in ./anaconda3/lib/python3.7/site-packages (from omegaconf>=2.0.1rc12->hydra-core) (5.3.1)
Requirement already satisfied, skipping upgrade: typing-extensions in ./anaconda3/lib/python3.7/site-packages (from omegaconf>=2.0.1rc12->hydra-core) (3.7.4.3)
paantya commented 4 years ago

it looks like I chose the wrong interpreter :с

paantya commented 4 years ago

Is it possible to somehow derive a version hydra from Python?

jieru-hu commented 4 years ago

Is it possible to somehow derive a version hydra from Python?

You can run python -m pip freeze | grep hydra to get the Hydra version

It looks like an installation issue, could you start with a fresh conda env and try reinstall Hydra?

omry commented 4 years ago

@paantya: I asked for the output of pip freeze and you show me the output of pip install.

omry commented 4 years ago

@omry

(base) user@s130:~$ pip install hydra-core --upgrade --pre
Requirement already up-to-date: hydra-core in ./anaconda3/lib/python3.7/site-packages (1.0.0rc4)
Requirement already satisfied, skipping upgrade: importlib-resources; python_version < "3.9" in ./anaconda3/lib/python3.7/site-packages (from hydra-core) (3.0.0)
Requirement already satisfied, skipping upgrade: omegaconf>=2.0.1rc12 in ./anaconda3/lib/python3.7/site-packages (from hydra-core) (2.0.1rc12)
Requirement already satisfied, skipping upgrade: antlr4-python3-runtime==4.8 in ./anaconda3/lib/python3.7/site-packages (from hydra-core) (4.8)
Requirement already satisfied, skipping upgrade: zipp>=0.4; python_version < "3.8" in ./anaconda3/lib/python3.7/site-packages (from importlib-resources; python_version < "3.9"->hydra-core) (3.1.0)
Requirement already satisfied, skipping upgrade: PyYAML>=5.1.* in ./anaconda3/lib/python3.7/site-packages (from omegaconf>=2.0.1rc12->hydra-core) (5.3.1)
Requirement already satisfied, skipping upgrade: typing-extensions in ./anaconda3/lib/python3.7/site-packages (from omegaconf>=2.0.1rc12->hydra-core) (3.7.4.3)

From your output it would appear that you installed hydra in your base conda environment. this strikes me as a mistake or as a terrible idea.

omry commented 4 years ago

Closing under the assumption that you have an installation issue and/or you installed the wrong Hydra package.

louismartin commented 4 years ago

OP probably installed the package Hydra with pip install hydra instead of the correct pip install hydra-core --upgrade.

I did the same mistake and had a similar error message:

ModuleNotFoundError: No module named 'hydra.core'; 'hydra' is not a package
monajalal commented 1 year ago

(neuralsfm) mona@ard-gpu-01:~/OnePose_Plus_Plus$ pip install hydra Collecting hydra Using cached Hydra-2.5.tar.gz (82 kB) 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 ╰─> [157 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-39 copying src/hydra.py -> build/lib.linux-x86_64-cpython-39 running build_ext building '_hydra' extension creating build/temp.linux-x86_64-cpython-39 creating build/temp.linux-x86_64-cpython-39/src gcc -pthread -B /home/mona/anaconda3/envs/neuralsfm/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/mona/anaconda3/envs/neuralsfm/include -I/home/mona/anaconda3/envs/neuralsfm/include -fPIC -O2 -isystem /home/mona/anaconda3/envs/neuralsfm/include -fPIC -I/tmp/pip-install-uf_boc2b/hydra_4a57fda074444b829e2f52e4b477ba60/src -I/home/mona/anaconda3/envs/neuralsfm/include/python3.9 -c src/MurmurHash3.c -o build/temp.linux-x86_64-cpython-39/src/MurmurHash3.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE gcc -pthread -B /home/mona/anaconda3/envs/neuralsfm/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/mona/anaconda3/envs/neuralsfm/include -I/home/mona/anaconda3/envs/neuralsfm/include -fPIC -O2 -isystem /home/mona/anaconda3/envs/neuralsfm/include -fPIC -I/tmp/pip-install-uf_boc2b/hydra_4a57fda074444b829e2f52e4b477ba60/src -I/home/mona/anaconda3/envs/neuralsfm/include/python3.9 -c src/_hydra.c -o build/temp.linux-x86_64-cpython-39/src/_hydra.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE src/_hydra.c: In function ‘pyx_pf_6_hydra_8MMapIter_2next’: src/_hydra.c:3377:36: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘Py_ssize_t’ {aka ‘long int’} [-Wsign-compare] 3377 | pyx_t_3 = ((pyx_v_self->_idx < pyx_t_2) != 0); | ^ src/_hydra.c: In function ‘PyInit__hydra’: src/_hydra.c:8530:34: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 8530 | pyx_type_6_hydra_MMapBitField.tp_print = 0; | ^ src/_hydra.c:8535:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 8535 | pyx_type_6_hydra_MMapIter.tp_print = 0; | ^ src/_hydra.c:8539:39: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 8539 | pyx_type_6_hydra_BloomCalculations.tp_print = 0; | ^ src/_hydra.c:8551:33: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 8551 | pyx_type_6_hydra_BloomFilter.tp_print = 0; | ^ src/_hydra.c: In function ‘Pyx_ParseOptionalKeywords’: src/_hydra.c:9924:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9924:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( | ^~~~~~~ src/_hydra.c:9924:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9924:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9924:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( | ^~~~~~~ src/_hydra.c:9924:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9940:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9940:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( | ^~~~~~~ src/_hydra.c:9940:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9940:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9940:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( | ^~~~~~~ src/_hydra.c:9940:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c: In function ‘Pyx_CyFunction_Call’: src/_hydra.c:11521:9: warning: ‘PyCFunction_Call’ is deprecated [-Wdeprecated-declarations] 11521 | return PyCFunction_Call(func, arg, kw); | ^~ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:107, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/methodobject.h:33:43: note: declared here 33 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject ) PyCFunction_Call(PyObject , PyObject , PyObject ); | ^~~~ src/_hydra.c: In function ‘pyx_CyFunction_init’: src/_hydra.c:11586:5: warning: ‘PyCFunction_Call’ is deprecated [-Wdeprecated-declarations] 11586 | pyx_CyFunctionType_type.tp_call = PyCFunction_Call; | ^~~~~~~~~ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:107, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/methodobject.h:33:43: note: declared here 33 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject ) PyCFunction_Call(PyObject , PyObject , PyObject ); | ^~~~ error: command '/usr/bin/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 ╰─> [159 lines of output] running install /home/mona/anaconda3/envs/neuralsfm/lib/python3.9/site-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-39 copying src/hydra.py -> build/lib.linux-x86_64-cpython-39 running build_ext building '_hydra' extension creating build/temp.linux-x86_64-cpython-39 creating build/temp.linux-x86_64-cpython-39/src gcc -pthread -B /home/mona/anaconda3/envs/neuralsfm/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/mona/anaconda3/envs/neuralsfm/include -I/home/mona/anaconda3/envs/neuralsfm/include -fPIC -O2 -isystem /home/mona/anaconda3/envs/neuralsfm/include -fPIC -I/tmp/pip-install-uf_boc2b/hydra_4a57fda074444b829e2f52e4b477ba60/src -I/home/mona/anaconda3/envs/neuralsfm/include/python3.9 -c src/MurmurHash3.c -o build/temp.linux-x86_64-cpython-39/src/MurmurHash3.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE gcc -pthread -B /home/mona/anaconda3/envs/neuralsfm/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/mona/anaconda3/envs/neuralsfm/include -I/home/mona/anaconda3/envs/neuralsfm/include -fPIC -O2 -isystem /home/mona/anaconda3/envs/neuralsfm/include -fPIC -I/tmp/pip-install-uf_boc2b/hydra_4a57fda074444b829e2f52e4b477ba60/src -I/home/mona/anaconda3/envs/neuralsfm/include/python3.9 -c src/_hydra.c -o build/temp.linux-x86_64-cpython-39/src/_hydra.o -std=gnu99 -O2 -D_LARGEFILE64_SOURCE src/_hydra.c: In function ‘pyx_pf_6_hydra_8MMapIter_2next’: src/_hydra.c:3377:36: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘Py_ssize_t’ {aka ‘long int’} [-Wsign-compare] 3377 | pyx_t_3 = ((pyx_v_self->_idx < pyx_t_2) != 0); | ^ src/_hydra.c: In function ‘PyInit__hydra’: src/_hydra.c:8530:34: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 8530 | pyx_type_6_hydra_MMapBitField.tp_print = 0; | ^ src/_hydra.c:8535:30: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 8535 | pyx_type_6_hydra_MMapIter.tp_print = 0; | ^ src/_hydra.c:8539:39: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 8539 | pyx_type_6_hydra_BloomCalculations.tp_print = 0; | ^ src/_hydra.c:8551:33: error: ‘PyTypeObject’ {aka ‘struct _typeobject’} has no member named ‘tp_print’ 8551 | pyx_type_6_hydra_BloomFilter.tp_print = 0; | ^ src/_hydra.c: In function ‘Pyx_ParseOptionalKeywords’: src/_hydra.c:9924:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9924:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( | ^~~~~~~ src/_hydra.c:9924:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9924:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9924:21: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(*name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( | ^~~~~~~ src/_hydra.c:9924:21: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9924 | (PyUnicode_GET_SIZE(name) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9940:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9940:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( | ^~~~~~~ src/_hydra.c:9940:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9940:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c:9940:25: warning: ‘PyUnicode_AsUnicode’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(*argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:580:45: note: declared here 580 | Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE ) PyUnicode_AsUnicode( | ^~~~~~~ src/_hydra.c:9940:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations] 9940 | (PyUnicode_GET_SIZE(argname) != PyUnicode_GET_SIZE(key)) ? 1 : | ^ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/unicodeobject.h:1026, from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:93, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here 446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) { | ^~~~~~ src/_hydra.c: In function ‘Pyx_CyFunction_Call’: src/_hydra.c:11521:9: warning: ‘PyCFunction_Call’ is deprecated [-Wdeprecated-declarations] 11521 | return PyCFunction_Call(func, arg, kw); | ^~ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:107, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/methodobject.h:33:43: note: declared here 33 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject ) PyCFunction_Call(PyObject , PyObject , PyObject ); | ^~~~ src/_hydra.c: In function ‘pyx_CyFunction_init’: src/_hydra.c:11586:5: warning: ‘PyCFunction_Call’ is deprecated [-Wdeprecated-declarations] 11586 | pyx_CyFunctionType_type.tp_call = PyCFunction_Call; | ^~~~~~~~~ In file included from /home/mona/anaconda3/envs/neuralsfm/include/python3.9/Python.h:107, from src/_hydra.c:16: /home/mona/anaconda3/envs/neuralsfm/include/python3.9/methodobject.h:33:43: note: declared here 33 | Py_DEPRECATED(3.9) PyAPI_FUNC(PyObject ) PyCFunction_Call(PyObject , PyObject , PyObject ); | ^~~~ error: command '/usr/bin/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: legacy-install-failure

× Encountered error while trying to install package. ╰─> hydra

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

omry commented 1 year ago

$ pip install hydra

This is the wrong Hydra. as the previous comment pointed out, you want hydra-core.