You are not logged in.
Hi,
i installed python-polars, but when i use it it says that fastexcel is not installed. Fastexcel is used by polars but is not on dependencies.
When i type
pip install python-fastexcelIt doesn't work, and fastexcel is not on package from archlinux. I even tried pipx. Is there a way to install it ?
Sincerely
Offline
There are 2 python-polars packages in aur, which one are you using ?
Moderator Note :
Moved to AUR Issues, Discussion & PKGBUILD Requests
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Online
There are 2 python-polars packages in aur, which one are you using ?
python-polars-bin 1.4.1-1
Offline
fastexcel is an un-packaged optional dependency of polars at least based on:
python -c 'import polars'How can I reproduce the error you are encountering?
Offline
import polars as pl
data=pl.read_ods(source="test.ods",
schema_overrides={"dt":pl.String},
raise_if_empty=False,
)
print(data.columns)And i have this error
Traceback (most recent call last):
File /usr/lib/python3.12/site-packages/spyder_kernels/py3compat.py:356 in compat_exec
exec(code, globals, locals)
File ~/Cours/Planning/test_polar.py:3
data=pl.read_ods(source="test.ods",
File /usr/lib/python3.12/site-packages/polars/io/spreadsheet/functions.py:439 in read_ods
return _read_spreadsheet(
File /usr/lib/python3.12/site-packages/polars/io/spreadsheet/functions.py:545 in _read_spreadsheet
reader_fn, parser, worksheets = _initialise_spreadsheet_parser(
File /usr/lib/python3.12/site-packages/polars/io/spreadsheet/functions.py:655 in _initialise_spreadsheet_parser
fastexcel = import_optional("fastexcel", min_version="0.7.0")
File /usr/lib/python3.12/site-packages/polars/dependencies.py:280 in import_optional
raise ModuleNotFoundError(err_message) from None
ModuleNotFoundError: required package 'fastexcel' not found.
Please install using the command `pip install fastexcel`.Offline
The following is a very rough PKGBUILD for fastexcel:
_name=fastexcel
pkgname=python-$_name
pkgver=0.11.5
pkgrel=1
pkgdesc='A Python wrapper around calamine '
arch=('x86_64')
url="https://github.com/ToucanToco/fastexcel"
license=('MIT')
depends=('python')
makedepends=('cargo' 'maturin' 'python-installer' 'git')
checkdepends=('python')
#options=('!lto')
source=("git+$url.git#tag=v$pkgver")
sha256sums=('e991a046e5d19ce3e78d29531680821898fcd380d948d602d8ebf4b359a497dc')
prepare() {
cd $_name
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd $_name
maturin build --locked --release --all-features --target "$(rustc -vV | sed -n 's/host: //p')" --strip
}
package() {
python -m installer --destdir="$pkgdir" $_name/target/wheels/*.whl
install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" $_name/LICENSE
}Offline
Hi,
thanks.
I did the PKGBUILD file, did makepkg then it created a file python-fastexcel-0.11.5-1-x86_64.pkg
I then did
sudo pacman -U python-fastexcel-0.11.5-1-x86_64.pkg.tar.zstI had to installed python-pyarrow and the error was removed.
As you did the PKGBUILD it would be nice to give access to the package to everyone. And add the python-pyarrow installed automaticaly too.
As it is your job (and good one), can you propose this package to AUR ? If you can't i will try to do it.
Thanks
Sincerely
Offline
As it is your job (and good one), can you propose this package to AUR ? If you can't i will try to do it.
Thanks
Sincerely
I am glad the PKGBUILD worked for you. I do not intend to submit the PKGBUILD to AUR as I do not use the package which I feel would make me a poor maintainer for it.
Last edited by loqs (2024-08-10 18:56:47)
Offline