datamol-io / graphium

Graphium: Scaling molecular GNNs to infinity.
https://graphium-docs.datamol.io/
Apache License 2.0
197 stars 12 forks source link

invalid version when installing in dev mode #492

Closed fpour closed 9 months ago

fpour commented 9 months ago

Trying to install Graphium in dev mode by running pip install --no-deps -e ., I faced with the following error:

File ".../lib/python3.11/site-packages/setuptools/_vendor/packaging/version.py", line 198, in __init__
          raise InvalidVersion(f"Invalid version: '{version}'")
      setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'dev'

which results in:

Getting requirements to build editable did not run successfully.
  exit code: 1

The issue can be resolved by replacing the "dev" to 2.4.dev1 in the pyproject.toml and the _version.py (not sure if that second one was needed).

DomInvivo commented 9 months ago

@jstlaurent Can you look into this? What's the best way of replacing "dev"?

jstlaurent commented 9 months ago

@fpour: Can you give more info about your environment? Are you using pyenv, venv, Conda, or something else?

I tried the command in a clean new venv and It worked for me, so I'm trying to see what I'm missing to reproduce the issue.

fpour commented 9 months ago

I used mamba and just followed the readme procedures. Basically, just ran the following commands:

mamba env create -f env.yml -n graphium
mamba activate graphium
pip install --no-deps -e .

I also tried upgrading the pip to the latest version: 23.3.1, didn't solve the issue.

jstlaurent commented 9 months ago

That's weird. I tried exactly the same series of instructions and it works fine for me. Maybe if you reset your conda environment?

mamba deactivate
mamba env remove -n graphium
fpour commented 9 months ago

I started a fresh env and don't see the issue anymore.

DomInvivo commented 9 months ago

Resolved