lorenzo-rovigatti / oxDNA

A new version of the code to simulate the oxDNA/oxRNA models, now equipped with Python bindings
https://dna.physics.ox.ac.uk/
GNU General Public License v3.0
38 stars 26 forks source link

[BUG] Trouble installing oxDNA #82

Closed mrland99 closed 6 months ago

mrland99 commented 7 months ago

Describe the bug I'm having trouble installing the newest version of oxDNA. I have tried installing on two Linux machines and Google Colab.

I tried debugging for a bit but couldn't resolve the issue. Unsure if it is a python dependency issue or something else. Do you have any idea what could be causing it?

python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [57 lines of output]
      /home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools/__init__.py:84: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!

              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************

      !!
        dist.fetch_build_eggs(dist.setup_requires)
      WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
      /home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/version.py:95: UserWarning: tag 'v.3.6.0' no version found
        warnings.warn(f"tag {tag!r} no version found")
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/home/Software/oxDNA/buid/oxpy/python/oxpy/setup.py", line 8, in <module>
          setup(
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools/dist.py", line 496, in __init__
          _Distribution.__init__(
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
          self.finalize_options()
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools/dist.py", line 935, in finalize_options
          ep(self)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools/dist.py", line 955, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/_integration/setuptools.py", line 101, in version_keyword
          _assign_version(dist, config)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/_integration/setuptools.py", line 53, in _assign_version
          maybe_version = _get_version(config, force_write_version_files=True)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/_get_version_impl.py", line 93, in _get_version
          parsed_version = parse_version(config)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/_get_version_impl.py", line 56, in parse_version
          or parse_scm_version(config)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/_get_version_impl.py", line 35, in parse_scm_version
          return _entrypoints.version_from_entrypoint(
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/_entrypoints.py", line 55, in version_from_entrypoint
          maybe_version: version.ScmVersion | None = fn(root, config=config)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/git.py", line 211, in parse
          return _git_parse_inner(
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/git.py", line 255, in _git_parse_inner
          version = version_from_describe(wd, config, describe_command)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/git.py", line 243, in version_from_describe
          return describe_res.parse_success(parse=parse_describe)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/_run_cmd.py", line 77, in parse_success
          return parse(self.stdout)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/git.py", line 241, in parse_describe
          return meta(tag=tag, distance=distance, dirty=dirty, node=node, config=config)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/version.py", line 210, in meta
          parsed_version = _parse_tag(tag, preformatted, config)
        File "/home/max/miniconda3/envs/oxdna/lib/python3.9/site-packages/setuptools_scm/version.py", line 193, in _parse_tag
          assert version is not None
      AssertionError
      [end of output]

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

To Reproduce

!git clone https://github.com/lorenzo-rovigatti/oxDNA
%cd oxDNA
%mkdir build
%cd build
!cmake .. -DPython=ON -DOxpySystemInstall=On  # dropping the -DCUDA=ON to make it build a lot faster. Use the flag while using GPU in runtime.
!make -j8
!make install

The make install causes the error.

For what it's worth, I've been able to install older versions of oxDNA using the same commands on Google colab.

Desktop (please complete the following information):

ErikPoppleton commented 7 months ago

@lorenzo-rovigatti this looks like a problem fetching the oxpy version when installed from GitHub instead of the release. I run into the same problem if I clone from GitHub, but there's no error if I just download the 3.6.0 release package.

@mrland99 We'll look into this. For now, I would recommend getting the working release package with curl and installing from that:

curl -L https://github.com/lorenzo-rovigatti/oxDNA/archive/refs/tags/v3.6.0.zip --output ./oxDNA-3.6.0.zip
unzip oxDNA-3.6.0.zip
cd oxDNA-3.6.0

And continue with making the build directory from there.

mrland99 commented 7 months ago

Thanks Erik, this worked.

lorenzo-rovigatti commented 7 months ago

I think that was caused by a stray . that ended up in a tag. I removed the offending tag and now everything seems to work as it should. Sorry about that!

lorenzo-rovigatti commented 6 months ago

The issue should be solved, so I'm closing this one, but feel free to reopen if needed.