nomad-coe / nomad

NOMAD lets you manage and share your materials science data in a way that makes it truly useful to you, your group, and the community.
https://nomad-lab.eu
Apache License 2.0
71 stars 16 forks source link

nomad-lab[parsing] installation fails #36

Closed gvlidiya closed 1 year ago

gvlidiya commented 1 year ago

I was trying to install NOMAD parser on my local machine, by following this instruction, but I get each time following problem:

Collecting mongoengine==0.19.1
  Using cached mongoengine-0.19.1.tar.gz (157 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in mongoengine setup command: use_2to3 is invalid.
      [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.

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

What could be done to resolve it?

markus1978 commented 1 year ago

The video tutorial is getting quite old and is referring to NOMAD v0.x. Can you try follow the more recent documentation: https://nomad-lab.eu/prod/v1/staging/docs/pythonlib.html

If the problem persist, pls let us know:

gvlidiya commented 1 year ago

Yes, the issue persist.

markus1978 commented 1 year ago

Did you also get the error with the --extra-index-url?

gvlidiya commented 1 year ago

The only what I get is that Requirement already satisfied for all packages, no other warnings or errors were shown.

$ pip install nomad-lab --extra-index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
Looking in indexes: https://pypi.org/simple, https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
Requirement already satisfied: ...
gvlidiya commented 1 year ago

Okay, problem was in error message error in mongoengine setup command: use_2to3 is invalid downgrade of pip install setuptools to 57.5.0 resolved the problem.

However, I encounter another issue by parsing. I know that there was problem of parsing GROMACS files in Web-Application, so I guess it might be the same problem here.

nomad parse --show-archive npt_T_10_p_50.zip
Traceback (most recent call last):
  File "/home/andromeda/anaconda3/bin/nomad", line 8, in <module>
    sys.exit(run_cli())
  File "/home/andromeda/anaconda3/lib/python3.9/site-packages/nomad/cli/cli.py", line 71, in run_cli
    return cli(obj=POPO())  # pylint: disable=E1120,E1123
  File "/home/andromeda/anaconda3/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/andromeda/anaconda3/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/andromeda/anaconda3/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/andromeda/anaconda3/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/andromeda/anaconda3/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/andromeda/anaconda3/lib/python3.9/site-packages/nomad/cli/parse.py", line 39, in _parse
    entry_archive = parse(mainfile, **kwargs)
  File "/home/andromeda/anaconda3/lib/python3.9/site-packages/nomad/client/processing.py", line 55, in parse
    assert parser is not None, 'there is no parser matching %s' % mainfile
AssertionError: there is no parser matching npt_T_10_p_50.zip
markus1978 commented 1 year ago

If you want to execute the parse with nomad parse you have to directly execute it on the gromacs output, not on a zip containing the gromacs output. The gromacs parser is only accepting files that start with gmx mdrun, (VERSION|version)[\s\S]*Input Parameters:

gvlidiya commented 1 year ago

Thank you for help.