linkml / schema-automator

Automated assistance for the schema development lifecycle
https://linkml.io/schema-automator/
BSD 3-Clause "New" or "Revised" License
39 stars 13 forks source link

rdflib and other pip incompatibilities #14

Closed turbomam closed 2 years ago

turbomam commented 3 years ago

I believe rdflib conflicts are already under discussion in the LinkML community? The click conflict is new to me. I've been doing some of my development on an Ubuntu 20 desktop recently.

(venv) mark@nuc-two-ups:~/gitrepos/linkml-model-enrichment$ pip install -r requirements.txt

... ERROR: linkml-runtime 1.1.2 has requirement rdflib~=5.0, but you'll have rdflib 6.0.2 which is incompatible. ERROR: sparqlslurper 0.4.1 has requirement rdflib~=5.0, but you'll have rdflib 6.0.2 which is incompatible. ERROR: pyshexc 0.8.3 has requirement rdflib~=5.0, but you'll have rdflib 6.0.2 which is incompatible. ERROR: pyshex 0.7.20 has requirement rdflib~=5.0, but you'll have rdflib 6.0.2 which is incompatible. ERROR: linkml 1.1.9 has requirement click~=7.0, but you'll have click 8.0.3 which is incompatible. ERROR: linkml 1.1.9 has requirement rdflib~=5.0, but you'll have rdflib 6.0.2 which is incompatible. ERROR: funowl 0.1.9 has requirement rdflib>=5.0.0,~=5.0, but you'll have rdflib 6.0.2 which is incompatible. ...

turbomam commented 3 years ago

It looks like the apt package manager installed some packages system-wide

pip3 freeze > installed.txt
pip3 uninstall -r installed.txt

... Found existing installation: appdirs 1.4.3 Not uninstalling appdirs at /usr/lib/python3/dist-packages, outside environment /usr ...

turbomam commented 3 years ago

tried pip3 install linkml instead. Installed linkml, -runtime, etc. and click.

turbomam commented 3 years ago
linkml-model-enrichment$ python3.9 -m venv venv
linkml-model-enrichment$ source venv/bin/activate
linkml-model-enrichment$ pip list

Package Version pip 20.0.2 pkg-resources 0.0.0
setuptools 44.0.0

turbomam commented 3 years ago

pip install wheel doesn't hurt

turbomam commented 3 years ago

Surprise

linkml-model-enrichment$ pip list | grep linkml

linkml 1.1.9
linkml-runtime 1.1.2
linkml-runtime-api 0.0.4

linkml-model-enrichment$ pip list | grep click

click 8.0.3
click-log 0.3.2
sphinx-click 3.0.1

linkml-model-enrichment$ pip list | grep rdf

rdflib 6.0.2
rdflib-jsonld 0.6.1
rdflib-pyldmod-compat 0.1.2

turbomam commented 3 years ago

linkml-model-enrichment$ tsv2linkml --output ../synbio-schema/util/query_results/synbio_part.yaml --class_name synbio_part ../synbio-schema/util/query_results/parts.tsv

Traceback (most recent call last): File "/home/mark/gitrepos/linkml-model-enrichment/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 568, in _build_master ws.require(requires) File "/home/mark/gitrepos/linkml-model-enrichment/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 886, in require needed = self.resolve(parse_requirements(requirements)) File "/home/mark/gitrepos/linkml-model-enrichment/venv/lib/python3.9/site-packages/pkg_resources/init.py", line 777, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (rdflib 6.0.2 (/home/mark/gitrepos/linkml-model-enrichment/venv/lib/python3.9/site-packages), Requirement.parse('rdflib>=5.0.0,~=5.0'), {'funowl'})

turbomam commented 3 years ago

commented out every line in requirements.txt, and linkml-model-enrichment worked. Will have to add some back in for XXX

sierra-moxon commented 2 years ago

@turbomam - I think I can close this as its pre-rdflib 6.0 migration? Please of course reopen if its still an issue.