Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install via pip on windows #10

Open
JMans15 opened this issue May 7, 2022 · 9 comments
Open

Can't install via pip on windows #10

JMans15 opened this issue May 7, 2022 · 9 comments

Comments

@JMans15
Copy link

JMans15 commented May 7, 2022

Hi, I tried to install jxlpy on windows using pip install jxlpy and got this error: ValueError: '_jxlpy/_jxl.pyx' doesn't match any files

@C0rn3j
Copy link

C0rn3j commented Jul 28, 2022

This is not a Windows exclusive issue, the Github 0.9.1 release is correct, the 0.9.1 release on PyPi is broken.

So is 0.9.2, but that does not have a Github release to compare to.

python setup.py build
python setup.py install --root="$pkgdir"
Traceback (most recent call last):
  File "/home/c0rn3j/AUR/python-jxlpy/src/jxlpy-0.9.2/setup.py", line 37, in <module>
    ext_modules=cythonize([jxlpy_ext]),
  File "/home/c0rn3j/.local/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 970, in cythonize
    module_list, module_metadata = create_extension_list(
  File "/home/c0rn3j/.local/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 816, in create_extension_list
    for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
  File "/home/c0rn3j/.local/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 114, in nonempty
    raise ValueError(error_msg)
ValueError: '_jxlpy/_jxl.pyx' doesn't match any files

PKGBUILD (for pacman) that I tested on

pkgname=python-jxlpy
_reponame=jxlpy
pkgver=0.9.2
pkgrel=1
pkgdesc="Module for reading and writing support for JPEG XL directly from Python"
url="https://pypi.org/project/jxlpy/"
arch=(any)
license=('GPL3')
depends=('python' 'libjxl')
makedepends=('python-setuptools' 'cython' 'git')
source=("https://pypi.org/packages/source/${_reponame::1}/${_reponame}/${_reponame}-$pkgver.tar.gz")
#source=("$pkgname-$pkgver.tar.gz::https://github.com/olokelo/jxlpy/archive/${pkgver}.tar.gz")
sha256sums=('26b5c6a85c492392008b0f80763cd90ba48540ade98b1e837ce800a551b2b844')

build() {
	cd "$srcdir/${_reponame}-$pkgver"
	python setup.py build
}

package() {
	cd "$srcdir/${_reponame}-$pkgver"
	python setup.py install --root="$pkgdir"
}

@inversepixel
Copy link

I have the same problem on Windows. Any estimation on when this will be fixed or any workarounds?
Many thanks!
/Tomas

@alexjc
Copy link
Contributor

alexjc commented Nov 30, 2022

It shows the same problem on MacOS as it's building from source. I the binaries work, but not the source ones?

@zhou13
Copy link

zhou13 commented Mar 7, 2023

It seems that

pip install git+https://github.com/olokelo/jxlpy

works for me

@C0rn3j
Copy link

C0rn3j commented Feb 7, 2024

The freshly released 0.9.3 github version is now correctly packaged.

PyPi seems to ship the _jxl.cpp still instead of _jxl.pyx, but pip install jxlpy now runs fine in a Linux venv on 3.11.6.

So I suppose this can be closed if Windows users can also confirm.

@c4yg70
Copy link

c4yg70 commented Feb 23, 2024

The freshly released 0.9.3 github version is now correctly packaged.

PyPi seems to ship the _jxl.cpp still instead of _jxl.pyx, but pip install jxlpy now runs fine in a Linux venv on 3.11.6.

So I suppose this can be closed if Windows users can also confirm.

Tested and works great in all below settings:

  • install ver0.9.3 from pypi
  • windows 11 23H2 22631.3155
  • Processor
    1. Intel ultra5 125H, 12700H, i7-7700k,
    2. AMD 7840H, 7950X, 7950X3D
  • Python 3.11, 3.12
  • Docker Python 3.11, 3.12 alpine, debian

Could not work even build loaclly:

  • LoongArch Processor
  • python 3.8
  • rk3568(arm64) python3.11

@olokelo
Copy link
Owner

olokelo commented Feb 23, 2024

Hi, thanks for testing on all those platforms.

If you have time you could also try building from master branch source modifying setup.py like here. For some reason .pyx file wasn't included in latest sdist on PyPI but maybe that 'hack' will make future releases build without issues.

Also I'm glad you had success building it on Windows.

@c4yg70
Copy link

c4yg70 commented Feb 28, 2024

I use PDM for my package manager so maybe thanks to pdm solved that problem for me?
I tried again yesterday and here is the result: directly calling pypi from python-windows installing ver0.9.3 would refuse to work, but calling from docker or using pdm worked fine. However, I do have libjxl compiled externally on my system, so others may fail to install. I would like to try building from source lately this week.

Also, libjxl has updated and wish to see a minor version update for jxlpy.

Best wishes.

@olokelo
Copy link
Owner

olokelo commented Mar 2, 2024

jxlpy 0.9.4 now ships with libjxl 0.10.1 and possibly fixed source distribution. You can try it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants