helgecph / cypher_kernel Goto Github PK
View Code? Open in Web Editor NEWAn experimental Jupyter kernel for the Cypher query language.
An experimental Jupyter kernel for the Cypher query language.
Thank you for the wonderful kernel!
It works fine on Jupyter Notebook but not in Jupyter Lab. More specifically, the result doesn't show up after exécution.
Currently, the kernel wraps the cypher-shell
. That is, when the kernel is getting started, a command similar to cypher-shell -u neo4j -p neo4j
is executed. That will of course only succeed when a Neo4j instance is running. Otherwise, cypher-shell
returns Connection refused
and the kernel crashes. That is an issue in case one wants to start notebooks in which one wants to create a Neo4j container only for this notebook, such as in examples/paradise_papers.ipynb
.
A possible solution could be to try to run cypher-shell -u neo4j -p neo4j
and check if it can connect (or check if a neo4j process is running) and if not to start a small instance in a container and connect to that.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-vmumfhnr/cypher-kernel/setup.py", line 2, in <module>
import cypher_kernel
File "/tmp/pip-install-vmumfhnr/cypher-kernel/cypher_kernel/__init__.py", line 3, in <module>
from .kernel import CypherKernel
File "/tmp/pip-install-vmumfhnr/cypher-kernel/cypher_kernel/kernel.py", line 2, in <module>
import yaml
ModuleNotFoundError: No module named 'yaml'
----------------------------------------
When I am trying to install from source, this is the error I'm facing:
Traceback (most recent call last):
#0 18.37 File "/usr/local/lib/python3.10/runpy.py", line 187, in _run_module_as_main
#0 18.37 mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
#0 18.37 File "/usr/local/lib/python3.10/runpy.py", line 110, in _get_module_details
#0 18.37 __import__(pkg_name)
#0 18.37 File "/app/src/utils/cypher_kernel/cypher_kernel/__init__.py", line 3, in <module>
#0 18.37 from .kernel import CypherKernel
#0 18.37 File "/app/src/utils/cypher_kernel/cypher_kernel/kernel.py", line 9, in <module>
#0 18.37 from neo4j.data import Node, Relationship
#0 18.37 ImportError: cannot import name 'Node' from 'neo4j.data' (/usr/local/lib/python3.10/site-packages/neo4j/data.py)
------
PS - I am trying to install this in a container. Below is the Dockerfile
:
FROM python:3.10-alpine
LABEL author=pk13055, version=1.0
ENV PYTHONPATH=/usr/lib/python3.10/site-packages
RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --update --no-cache \
gcc libffi-dev musl-dev \
glib-dev pango-dev racket@testing \
py3-numpy@testing py3-pandas@testing \
py3-scipy@testing py3-scikit-learn \
py3-matplotlib@testing py3-seaborn@testing
COPY src/utils/cypher_kernel/ /app/src/utils/cypher_kernel/
WORKDIR /app/src/utils/cypher_kernel
RUN pip install . \
&& python -m cypher_kernel.install
WORKDIR /app
COPY requirements.* ./
RUN pip install -r requirements.in
COPY . .
ENTRYPOINT ["./entrypoint.sh"]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.