sparqlgpviz
sparqlgpviz copied to clipboard
Installation instructions & Running provided example
I found your tool and felt it would be useful. I have honestly struggled with the installation (not being a python developer) so I thought I'd share so maybe you can improve your README. Also, I wasn't able to run the basic example and I'd love your help on this. Thanks in advance.
Installation
-
Install conda: https://docs.conda.io/en/latest/miniconda.html
-
Setup your conda environment:
conda create -yn sparqlgpviz python=3.7
conda activate sparqlgpviz
- Install libs
Please note that it is curently not possible to install all dependencies through
pip install -r requirements.txt
.rdflib
is ok (even so you need to have a == instead of = in the requirements.txt).pygraphviz
doesn't install I had to use conda to do it as explained on their website (https://pygraphviz.github.io/documentation/stable/install.html). So here is is
pip install rdflib
conda install --channel conda-forge pygraphviz
- Check status
pip list
Package Version
---------- ---------
certifi 2021.10.8
isodate 0.6.1
pip 21.2.2
pygraphviz 1.7
pyparsing 3.0.9
rdflib 4.2.2
setuptools 61.2.0
six 1.16.0
wheel 0.37.1
Running the example
cat simple/all.rq
SELECT * WHERE { ?s ?p ?o }
python3 sparqlgraphviz.py -i simple/all.rq
Traceback (most recent call last):
File "sparqlgraphviz.py", line 5, in <module>
from rdflib.plugins.sparql.parser import parseQuery
File "/Users/kerrien/opt/miniconda3/envs/sparqlgpviz/lib/python3.7/site-packages/rdflib/plugins/sparql/__init__.py", line 35, in <module>
from . import parser
File "/Users/kerrien/opt/miniconda3/envs/sparqlgpviz/lib/python3.7/site-packages/rdflib/plugins/sparql/parser.py", line 182, in <module>
Param('prefix', PN_PREFIX)) + Suppress(':').leaveWhitespace()
File "/Users/kerrien/opt/miniconda3/envs/sparqlgpviz/lib/python3.7/site-packages/rdflib/plugins/sparql/parserutils.py", line 113, in __init__
self.name = name
AttributeError: can't set attribute
Any help appreciated ;) Cheers Samuel