MolSSI-BSE / basis_set_exchange

A repository for quantum chemistry basis sets
https://molssi-bse.github.io/basis_set_exchange/
BSD 3-Clause "New" or "Revised" License
151 stars 44 forks source link

BSE has no metadata #310

Open susilehtola opened 1 month ago

susilehtola commented 1 month ago

Updating to current master and trying to import BSE throws an error

$ python add_et.py
Traceback (most recent call last):
  File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 397, in from_name
    return next(cls.discover(name=name))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/work/basis_set_exchange-historical/positronic/add_et.py", line 3, in <module>
    from basis_set_exchange import lut, manip, curate
  File "/home/work/basis_set_exchange/basis_set_exchange/__init__.py", line 58, in <module>
    __version__ = version("basis_set_exchange")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 889, in version
    return distribution(distribution_name).version
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 862, in distribution
    return Distribution.from_name(distribution_name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/importlib/metadata/__init__.py", line 399, in from_name
    raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: No package metadata was found for basis_set_exchange
bennybp commented 1 month ago

I think you are trying to run that script from within the package directory without first installing the package into the python environment. After doing that, it works for me.

pip install -e ./ (or wherever the pyproject.toml is)

susilehtola commented 1 week ago

Yes, BSE used to work straight as a git repository.