Cannot install python SDK on Raspbian Linux
Opened this issue · 4 comments
Installation is failing on raspbian bookworm.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
After running python -m pip openmeteo-sdk
the installation reports success.
Python version: Python 3.11.2
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting openmeteo-sdk
Using cached https://www.piwheels.org/simple/openmeteo-sdk/openmeteo_sdk-1.8.0-py3-none-any.whl (6.4 kB)
Requirement already satisfied: flatbuffers>=23.0.0 in /ssd/dev/venv/openmeteo/lib/python3.11/site-packages (from openmeteo-sdk) (20181003210633)
Installing collected packages: openmeteo-sdk
Successfully installed openmeteo-sdk-1.8.0
Although in site-packages I only have a dist-info
directory but no python application files.
drwxr-xr-x 2 pi raspberry 4096 Feb 3 10:45 idna-3.6.dist-info
drwxr-xr-x 3 pi raspberry 4096 Feb 3 10:45 openmeteo_requests
drwxr-xr-x 3 pi raspberry 4096 Feb 3 10:45 openmeteo_requests-1.1.0.dist-info
drwxr-xr-x 3 pi raspberry 4096 Feb 4 12:20 openmeteo_sdk-1.8.0.dist-info # Only Directory, no openmeteo_sdk directory and files
drwxr-xr-x 5 pi raspberry 4096 Feb 3 22:10 pip
Running through the same process on Ubuntu 20.04 focal and 22.04 jammy works as expected and I can run queries.
Any help would be appreciated.
Hi,
thanks for the report. Unfortunately, I have no clue why openmeteo_sdk
is not installing correctly for Raspbian, but openmeteo_requests
works correctly. The build process is mostly the same.
As a workaround I've been able to untar the .tar.gz
manually and use openmeteo_sdk
as a local package. I did notice openmeteo_requests
installs correctly into site_packages
. I'll provide an update if I find something else out.
I had the same error on my Debian Bullseye
raspberry pi.
- Missing the package directory
- No errors at all while installing using
pip
on apython3.9
environment - My code errors out in a
ModuleNotFound
error referencing to theopenmeteo_sdk
package
I tried to download the archive and install it manually from my project using
cd openmeteo_sdk
pip install . --force-reinstall
Which gave me the same results as before.
I tried to narrow down the cause and I found the the hatch
building system one way or another causes this issue.
When I change the pyproject.toml
file to use the default setuptools
package, the installation goes perfectly and my program works using openmeteo 🥳
This is my pyproject.toml
file:
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "openmeteo_sdk"
version = "1.11.4"
authors = [
{name = "Patrick Zippenfenig", email = "info@open-meteo.com"},
]
description = "Open-Meteo Python SDK"
readme = "README.md"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11"
]
requires-python = ">=3.8.1"
dependencies = [
"flatbuffers>=24.0.0",
]
[project.urls]
Documentation = "https://github.com/open-meteo/sdk/tree/main#readme"
Source = "https://github.com/open-meteo/sdk"
Tracker = "https://github.com/open-meteo/sdk/issues"
Not sure for this moment to make a PR, I hope some of you guys could test my solution and prove all functionalities (I use only limited openmeteo api) seem to work. And the sdk package seem to use some overhead multiprogramming language system to auto fill package versions etc. Some advice needed on this end.
Kind regards
Hacor
Thanks for the hint about setuptools
. IIRC setuptools
had another issue with the automated build system and therefore I switched to hatchling
. I think the issue was related to the path prefix python/openmeteo_sdk
. Is it possible to reproduce the error in Docker?