Hi all,
I tried different ways to install the Python Driver (using different python versions, using a virtual environment, using a conda environment…) but constantly got the error
ERROR: Could not find a version that satisfies the requirement typedb-driver
Does anyone have some suggestions how I could resolve it?
Many thanks in advance!
Hi there!
This could be since our python driver is now a wrapper around a native, Rust-based library so it has become platform dependent, as you can see with all the variations in releases here: typedb-driver · PyPI
This is like what Numpy or SciPy does for example!
What you have to check is that your Python version and Platform (OS + Architecture) are available as installation packages. This is listed in the requirements in the docs here: TypeDB | Docs > TypeDB drivers > Python driver
I suspect you might be on Python 12 which we don’t have a release for yet? If that’s not it then we can dig deeper.
Hi @joshua
Thank you so much for your reply!
I had seen these compatibility descriptions and therefore used conda and virtual environments respectively with Python 3.9 and Python 3.11 but it did not help.
Could the issue be due to the machine I am using (MacOS Sonoma 14.2.1).
I now use a work-around with Docker and install the driver in there but it definitely complicates the development and it would be great to get the driver working without Docker.
Many thanks again!
Hi @c-lare
Just to verify, could you please download a whl (py3.11 M series / Intel) and try installing the driver from a file?
python3.11 -m pip install typedb_driver-2.26.6-py311-none-macosx_11_0_arm64.whl
Hi @dmitrii,
I just tried what you suggested but get this error:
ERROR: typedb_driver-2.26.6-py311-none-macosx_11_0_x86_64.whl is not a supported wheel on this platform.
Is there any information that might be of help for you? My typedb server version is Version: 2.26.6
Many thanks for your help!
Have you tried both whls? Is the error message the same in both cases?
I have tried both and both give the same error.
Could you run this just to get some extra info on the python version you’re running:
echo "import distutils, sys; print( sys.version, distutils.util.get_platform())" | python3.11
Hi @krishnan,
Please excuse my delayed reply. This is what I get when running your code snipped:
3.11.8 (main, Feb 26 2024, 15:43:17) [Clang 14.0.6 ] macosx-10.9-x86_64
That’s interesting because distutils seems to be for macosx-10.9-x86_64
.
Could you try python3.11 -m pip install setuptools
and re-run the snippet?
If it changes to macosx-11-*
or higher, retry installing typedb-driver?
Could you try running the snippets for your other python installations:
echo "import distutils, sys; print( sys.version, distutils.util.get_platform())" | python3.9
and see what version it says as well?