Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-12-2023 10:25 AM
Hi,
I'm fairly new to Neo4j. I've been using the official Neo4j driver for Python in my work for some months now without issue. Just this week, I started to notice a warning message when the driver is installed, as can be seen below. I still manage to install the driver and create a connection to a database but I'm wondering if anyone can shed any light on why this warning is suddenly being generated and whether it's something to be concerned about.
Thanks
Solved! Go to Solution.
01-16-2023 06:16 AM - edited 01-16-2023 06:19 AM
I was about to despair as I didn't understand why the installation process was failing for the newer drivers (5.3.0 and up). Seems like google colab is shipping with a non-up-to-date pip (v. 22.0.4 from March 2022). If you run
!pip install -U pip
you should see something like
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (22.0.4) Collecting pip Downloading pip-22.3.1-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 12.5 MB/s eta 0:00:00 Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 22.0.4 Uninstalling pip-22.0.4: Successfully uninstalled pip-22.0.4 Successfully installed pip-22.3.1
If you do that before installing the driver with !pip install neo4j
the warning should disappear and pip should install version 5.4.0 (or whatever is the latest version) instead of falling back to 5.2.1. If you have installed the driver already, you can ask pip to attempt an update with !pip install -U neo4j
instead.
Semi-related bonus tip: even though you are running on Google Colab, you can still get the host's OS and other information with a cell like this (assuming the notebook is running on a Linux machine)
%%bash pip -VV python -VV lsb_release -a
01-13-2023 07:32 AM - edited 01-13-2023 07:40 AM
🤔 hm this looks odd indeed. Can you please share the output of a few commands with me so that I can try to reproduce it?
python -VV
pip -VV
pip install -v --no-cache-dir --force neo4j
pip freeze --all
Finally, what plattform/OS are you running on? Even though, this is a different issue, homebrew on macOS sometimes struggles a little with getting Python installations right https://github.com/neo4j/neo4j-python-driver/issues/871
01-14-2023 01:16 AM
Hi there. Thanks for the reply. I'm using Jupyter notebook via Google Colab for this task so I'm not on my machine's OS. The notebook is running Python 3.8.16.
Installing the driver is the first line of code in this notebook. I run the following pip install, which then generates the warnings as part of the build process:
!pip install neo4j
01-16-2023 06:16 AM - edited 01-16-2023 06:19 AM
I was about to despair as I didn't understand why the installation process was failing for the newer drivers (5.3.0 and up). Seems like google colab is shipping with a non-up-to-date pip (v. 22.0.4 from March 2022). If you run
!pip install -U pip
you should see something like
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/ Requirement already satisfied: pip in /usr/local/lib/python3.8/dist-packages (22.0.4) Collecting pip Downloading pip-22.3.1-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 12.5 MB/s eta 0:00:00 Installing collected packages: pip Attempting uninstall: pip Found existing installation: pip 22.0.4 Uninstalling pip-22.0.4: Successfully uninstalled pip-22.0.4 Successfully installed pip-22.3.1
If you do that before installing the driver with !pip install neo4j
the warning should disappear and pip should install version 5.4.0 (or whatever is the latest version) instead of falling back to 5.2.1. If you have installed the driver already, you can ask pip to attempt an update with !pip install -U neo4j
instead.
Semi-related bonus tip: even though you are running on Google Colab, you can still get the host's OS and other information with a cell like this (assuming the notebook is running on a Linux machine)
%%bash pip -VV python -VV lsb_release -a
01-16-2023 07:35 AM
Bingo! That appears to have worked - thank you so much and thanks for the Colab tips as well.
All the sessions of the conference are now available online