Building Neo4j Applications with Pytho - Gitpod does not let me install neo4j

When trying to execute
$ pip install neo4j
I get an error:
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

How to fix this?

Hi,

I think the issue is occuring due to gitpod changing to use Python 3.12 as default. Currently the Neo4j Python driver only supports up to Python 3.11.

You can install Python 3.11 in gitpod by running the following commands to install and set it to be used. You can then install the driver.

pyenv install 3.11
pyenv global 3.11
pip install neo4j

I am looking at the implications of this.

Martin

1 Like

Yep. Sadly Python 3.12 not working with the latest released version of the driver due to setuptools breaking :confused:

Will be supported in the next release

1 Like

In the mean time a change has been made when launching the project in gitpod to download and install python 3.11.

@joa.jordan12 I suspect you will still need to download and setup 3.11 in gitpod manually as you project was created before this change.

1 Like

AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

Ask Question