Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install AI4Bharat Nemo #5

Open
monali-2210 opened this issue Nov 26, 2024 · 6 comments
Open

Unable to install AI4Bharat Nemo #5

monali-2210 opened this issue Nov 26, 2024 · 6 comments

Comments

@monali-2210
Copy link

I am trying to do the first step (using SageMaker Jupyter Notebook) which is:
git clone https://github.com/AI4Bharat/NeMo.git && cd NeMo && git checkout nemo-v2 && bash reinstall.sh

This command gives this below error:

Collecting wget (from nemo_toolkit->nemo_toolkit[all])
Using cached wget-3.2.zip (10 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-install-imkdcqra/wget_8201a2e174de455884bfc9dc54556ba8/setup.py", line 15, in
setup(
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 183, in setup
return run_commands(dist)
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 199, in run_commands
dist.run_commands()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 954, in run_commands
self.run_command(cmd)
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/dist.py", line 950, in run_command
super().run_command(command)
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_command
cmd_obj.run()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 311, in run
self.find_sources()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 319, in find_sources
mm.run()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 545, in run
self.prune_file_list()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/command/sdist.py", line 161, in prune_file_list
super().prune_file_list()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_list
base_dir = self.distribution.get_fullname()
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 267, in get_fullname
return _distribution_fullname(self.get_name(), self.get_version())
File "/home/ec2-user/anaconda3/envs/python3/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 285, in _distribution_fullname
canonicalize_version(version, strip_trailing_zero=False),
TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

@monali-2210
Copy link
Author

@ryback123 please help me with this

@Aniruddh-J
Copy link

What's your packaging version?

@monali-2210
Copy link
Author

What's your packaging version?

24.2

@monali-2210
Copy link
Author

monali-2210 commented Dec 4, 2024

`Collecting pynini
Using cached pynini-2.1.6.post1.tar.gz (790 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pynini
Building wheel for pynini (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pynini (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [115 lines of output]
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-310/pynini
copying pynini/init.py -> build/lib.linux-x86_64-cpython-310/pynini
creating build/lib.linux-x86_64-cpython-310/pywrapfst
copying pywrapfst/init.py -> build/lib.linux-x86_64-cpython-310/pywrapfst
creating build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/init.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/case.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/chatspeak.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/chatspeak_model.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/dates.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/g2p.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/numbers.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/plurals.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/t9.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/weather.py -> build/lib.linux-x86_64-cpython-310/pynini/examples
creating build/lib.linux-x86_64-cpython-310/pynini/export
copying pynini/export/init.py -> build/lib.linux-x86_64-cpython-310/pynini/export
copying pynini/export/export.py -> build/lib.linux-x86_64-cpython-310/pynini/export
copying pynini/export/grm.py -> build/lib.linux-x86_64-cpython-310/pynini/export
copying pynini/export/grm_example.py -> build/lib.linux-x86_64-cpython-310/pynini/export
copying pynini/export/multi_grm.py -> build/lib.linux-x86_64-cpython-310/pynini/export
copying pynini/export/multi_grm_example.py -> build/lib.linux-x86_64-cpython-310/pynini/export
creating build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/init.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/byte.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/edit_transducer.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/features.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/paradigms.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/pynutil.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/rewrite.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/rule_cascade.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/stringfile.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/tagger.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/utf8.py -> build/lib.linux-x86_64-cpython-310/pynini/lib
running egg_info
writing pynini.egg-info/PKG-INFO
writing dependency_links to pynini.egg-info/dependency_links.txt
writing top-level names to pynini.egg-info/top_level.txt
reading manifest file 'pynini.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
adding license file 'AUTHORS'
writing manifest file 'pynini.egg-info/SOURCES.txt'
copying pynini/BUILD.bazel -> build/lib.linux-x86_64-cpython-310/pynini
copying pynini/init.pyi -> build/lib.linux-x86_64-cpython-310/pynini
copying pynini/py.typed -> build/lib.linux-x86_64-cpython-310/pynini
copying pywrapfst/BUILD.bazel -> build/lib.linux-x86_64-cpython-310/pywrapfst
copying pywrapfst/init.pyi -> build/lib.linux-x86_64-cpython-310/pywrapfst
copying pywrapfst/py.typed -> build/lib.linux-x86_64-cpython-310/pywrapfst
copying pynini/examples/BUILD.bazel -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/examples/py.typed -> build/lib.linux-x86_64-cpython-310/pynini/examples
copying pynini/export/BUILD.bazel -> build/lib.linux-x86_64-cpython-310/pynini/export
copying pynini/export/grm_py_build_defs.bzl -> build/lib.linux-x86_64-cpython-310/pynini/export
copying pynini/export/py.typed -> build/lib.linux-x86_64-cpython-310/pynini/export
copying pynini/lib/BUILD.bazel -> build/lib.linux-x86_64-cpython-310/pynini/lib
copying pynini/lib/py.typed -> build/lib.linux-x86_64-cpython-310/pynini/lib
running build_ext
building '_pywrapfst' extension
creating build/temp.linux-x86_64-cpython-310/extensions
/home/ec2-user/anaconda3/envs/temo/bin/x86_64-conda-linux-gnu-c++ -std=c++17 -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ec2-user/anaconda3/envs/temo/include -fPIC -I/home/ec2-user/anaconda3/envs/temo/include/python3.10 -c extensions/pywrapfst.cpp -o build/temp.linux-x86_64-cpython-310/extensions/pywrapfst.o -std=c++17 -Wno-register -Wno-deprecated-declarations -Wno-unused-function -Wno-unused-local-typedefs -funsigned-char
In file included from /home/ec2-user/anaconda3/envs/temo/include/fst/arcfilter.h:23,
from /home/ec2-user/anaconda3/envs/temo/include/fst/accumulator.h:33,
from /home/ec2-user/anaconda3/envs/temo/include/fst/fstlib.h:42,
from extensions/pywrapfst.cpp:1290:
/home/ec2-user/anaconda3/envs/temo/include/fst/fst.h: In member function 'fst::internal::FstImpl& fst::internal::FstImpl::operator=(const fst::internal::FstImpl&)':
/home/ec2-user/anaconda3/envs/temo/include/fst/fst.h:690:59: error: no match for 'operator=' (operand types are 'std::unique_ptr<fst::SymbolTable, std::default_deletefst::SymbolTable >' and 'fst::SymbolTable*')
690 | isymbols
= impl.isymbols
? impl.isymbols
->Copy() : nullptr;
| ^~~~~~~
In file included from /home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/memory:78,
from extensions/_pywrapfst.cpp:1269:
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:424:9: note: candidate: 'template<class _Up, class _Ep> typename std::enable_if<std::_and<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::__uniq_ptr_impl<_Tp, _Dp>::pointer>, std::_not<std::is_array<_Up> > >, std::is_assignable<_T2&, _U2&&> >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Ep = _Up; _Tp = fst::SymbolTable; _Dp = std::default_deletefst::SymbolTable]'
424 | operator=(unique_ptr<_Up, _Ep>&& _u) noexcept
| ^~~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:424:9: note: template argument deduction/substitution failed:
/home/ec2-user/anaconda3/envs/temo/include/fst/fst.h:690:59: note: mismatched types 'std::unique_ptr<Tp, Dp>' and 'fst::SymbolTable*'
690 | isymbols
= impl.isymbols
? impl.isymbols
->Copy() : nullptr;
| ^~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:408:19: note: candidate: 'std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = fst::SymbolTable; _Dp = std::default_deletefst::SymbolTable]'
408 | unique_ptr& operator=(unique_ptr&&) = default;
| ^~~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:408:29: note: no known conversion for argument 1 from 'fst::SymbolTable*' to 'std::unique_ptr<fst::SymbolTable, std::default_deletefst::SymbolTable >&&'
408 | unique_ptr& operator=(unique_ptr&&) = default;
| ^~~~~~~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:434:7: note: candidate: 'std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, Dp>::operator=(std::nullptr_t) [with Tp = fst::SymbolTable; Dp = std::default_deletefst::SymbolTable; std::nullptr_t = std::nullptr_t]'
434 | operator=(nullptr_t) noexcept
| ^~~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:434:17: note: no known conversion for argument 1 from 'fst::SymbolTable*' to 'std::nullptr_t'
434 | operator=(nullptr_t) noexcept
| ^~~~~~~~~
/home/ec2-user/anaconda3/envs/temo/include/fst/fst.h:691:59: error: no match for 'operator=' (operand types are 'std::unique_ptr<fst::SymbolTable, std::default_deletefst::SymbolTable >' and 'fst::SymbolTable*')
691 | osymbols
= impl.osymbols
? impl.osymbols
->Copy() : nullptr;
| ^~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:424:9: note: candidate: 'template<class _Up, class _Ep> typename std::enable_if<std::_and<std::_and<std::is_convertible<typename std::unique_ptr<_Up, _Ep>::pointer, typename std::__uniq_ptr_impl<_Tp, _Dp>::pointer>, std::_not<std::is_array<_Up> > >, std::is_assignable<_T2&, _U2&&> >::value, std::unique_ptr<_Tp, _Dp>&>::type std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Ep = _Up; _Tp = fst::SymbolTable; _Dp = std::default_deletefst::SymbolTable]'
424 | operator=(unique_ptr<_Up, _Ep>&& _u) noexcept
| ^~~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:424:9: note: template argument deduction/substitution failed:
/home/ec2-user/anaconda3/envs/temo/include/fst/fst.h:691:59: note: mismatched types 'std::unique_ptr<Tp, Dp>' and 'fst::SymbolTable*'
691 | osymbols
= impl.osymbols
? impl.osymbols
->Copy() : nullptr;
| ^~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:408:19: note: candidate: 'std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = fst::SymbolTable; _Dp = std::default_deletefst::SymbolTable]'
408 | unique_ptr& operator=(unique_ptr&&) = default;
| ^~~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:408:29: note: no known conversion for argument 1 from 'fst::SymbolTable*' to 'std::unique_ptr<fst::SymbolTable, std::default_deletefst::SymbolTable >&&'
408 | unique_ptr& operator=(unique_ptr&&) = default;
| ^~~~~~~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:434:7: note: candidate: 'std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(std::nullptr_t) [with _Tp = fst::SymbolTable; _Dp = std::default_deletefst::SymbolTable; std::nullptr_t = std::nullptr_t]'
434 | operator=(nullptr_t) noexcept
| ^~~~~~~~
/home/ec2-user/anaconda3/envs/temo/lib/gcc/x86_64-conda-linux-gnu/14.2.0/include/c++/bits/unique_ptr.h:434:17: note: no known conversion for argument 1 from 'fst::SymbolTable*' to 'std::nullptr_t'
434 | operator=(nullptr_t) noexcept
| ^~~~~~~~~
error: command '/home/ec2-user/anaconda3/envs/temo/bin/x86_64-conda-linux-gnu-c++' 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 pynini
Failed to build pynini
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pynini)

I tried running it in conda env and again got this error`

@ryback123
Copy link
Collaborator

requirements.txt
setup.sh

@monali-2210 this is a configuration we are using internally. Create a new conda environment, download this requirements.txt file and then run the commands in the setup file. Let me know if this works.

There maybe some unused dependencies, but you can get rid of that later.

@monali-2210
Copy link
Author

Tried and got this error - link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants