sssom-py icon indicating copy to clipboard operation
sssom-py copied to clipboard

Install instructions are incorrect/Installation not possible

Open Hannah-Doerpholz opened this issue 9 months ago • 1 comments

Hello. I was just looking at the linked documentation for the install instructions of sssom-py. I have first tried installing sssom-py in a conda environment using pip install sssom. To verify the installation, I wanted to print the version, but encountered the following error (I have removed my local directory paths):

sssom --version
Traceback (most recent call last):
  File "/<local_path>/miniconda3/envs/sssom/bin/sssom", line 5, in <module>
    from sssom.cli import main
  File "/<local_path>/miniconda3/envs/sssom/lib/python3.7/site-packages/sssom/__init__.py", line 18, in <module>
    from .util import (  # noqa:401
  File "/<local_path>/miniconda3/envs/sssom/lib/python3.7/site-packages/sssom/util.py", line 77, in <module>
    from .context import (
  File "/<local_path>/miniconda3/envs/sssom/lib/python3.7/site-packages/sssom/context.py", line 8, in <module>
    from linkml.generators.jsonldcontextgen import ContextGenerator
  File "/<local_path>/miniconda3/envs/sssom/lib/python3.7/site-packages/linkml/generators/__init__.py", line 6, in <module>
    from linkml.generators.javagen import JavaGenerator
  File "/<local_path>/miniconda3/envs/sssom/lib/python3.7/site-packages/linkml/generators/javagen.py", line 11, in <module>
    from linkml.generators.oocodegen import OOCodeGenerator
  File "/<local_path>/miniconda3/envs/sssom/lib/python3.7/site-packages/linkml/generators/oocodegen.py", line 18, in <module>
    from linkml.utils.generator import Generator
  File "/<local_path>/miniconda3/envs/sssom/lib/python3.7/site-packages/linkml/utils/generator.py", line 62, in <module>
    @lru_cache
  File "/<local_path>/miniconda3/envs/sssom/lib/python3.7/functools.py", line 490, in lru_cache
    raise TypeError('Expected maxsize to be an integer or None')
TypeError: Expected maxsize to be an integer or None

I then checked out the section for building sssom-py from source. However, I noticed that there is neither a setup.cfg file nor a setup.py file present. For this reason, I am unfortunately unable to install sssom-py. Could you help me with this issue or update your instructions?

Hannah-Doerpholz avatar Feb 24 '25 14:02 Hannah-Doerpholz

Thank you for your issue!

If you want to use pip install, you have to create a new environment if you want to avoid conflicts with existing packages, and a supported Python version (certainly 3.11, maybe 3.12).

For a local install, run "poetry install" - dependency and packaging is managed with poetry, not pip. Let me know if either one worked for you!

matentzn avatar Feb 26 '25 20:02 matentzn

The documentation says to use pip. This works:

pip install sssom

This does not work as documented:

python setup.py install # fails because missing setup.py

nor as described here

pip install tox
tox # fails because missing poetry

nichtich avatar Apr 03 '25 07:04 nichtich

Thank you for the hint! I tried using python 3.7 since this is what is mentioned in the documentation, as well as the most recent python version, but neither of those worked. However, when I explicitly installed 3.11 in my new environment, the installation worked.

If we should rather do a poetry install instead of pip, I think it would be great to update the documentation, since I am unfortunately not very familiar with many different install methods (apart from pip, conda and apt install).

Thank you for your issue!

If you want to use pip install, you have to create a new environment if you want to avoid conflicts with existing packages, and a supported Python version (certainly 3.11, maybe 3.12).

For a local install, run "poetry install" - dependency and packaging is managed with poetry, not pip. Let me know if either one worked for you!

Hannah-Doerpholz avatar Apr 03 '25 08:04 Hannah-Doerpholz

The documentation page is so out of date.. Sigh.. I will try to update everything in the next round of improvements. Sorry about that!

We support 3.10, 3.11 at the moment..

matentzn avatar Apr 07 '25 07:04 matentzn