HelgeCPH / cypher_kernel

An experimental Jupyter kernel for the Cypher query language.
4 stars 1 forks source link

[Bug] cannot import name 'Node' from 'neo4j.data' #5

Open Pk13055 opened 1 year ago

Pk13055 commented 1 year ago

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"]
ralfeus commented 7 months ago

Version of neo4j 5.0.0 has breaking change. Install neo4j==4.4.11 instead