Bug 2255539 - ModuleNotFoundError: No module named 'lensfun'
Summary: ModuleNotFoundError: No module named 'lensfun'
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: lensfun
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2257782 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-21 18:20 UTC by Germano Massullo
Modified: 2024-03-17 17:58 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
contents of the two packages python-lensfun-fc38 and python-fc39 (48.48 KB, image/jpeg)
2024-03-17 17:58 UTC, le.poittevin.laurent
no flags Details

Description Germano Massullo 2023-12-21 18:20:50 UTC
lensfun-update-data  is broken on F39. I don't find a way to fix it. I also tried the new 0.3.4 [1], but it is affected too

$ lensfun-update-data 
Traceback (most recent call last):
  File "/usr/bin/lensfun-update-data", line 46, in <module>
    import lensfun
ModuleNotFoundError: No module named 'lensfun'

[1]: https://download.copr.fedorainfracloud.org/results/germano/lensfun/fedora-39-x86_64/06782001-lensfun/

Reproducible: Always

Comment 1 Germano Massullo 2023-12-21 21:57:18 UTC
Checking .pth file support in /builddir/build/BUILDROOT/lensfun-0.3.4-1.fc39.x86_64/usr/lib/python3.12/site-packages/
/usr/bin/python3 -E -c pass
TEST FAILED: /builddir/build/BUILDROOT/lensfun-0.3.4-1.fc39.x86_64/usr/lib/python3.12/site-packages/ does NOT support .pth files
bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /builddir/build/BUILDROOT/lensfun-0.3.4-1.fc39.x86_64/usr/lib/python3.12/site-packages/

and your PYTHONPATH environment variable currently contains:

    ''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://setuptools.pypa.io/en/latest/deprecated/easy_install.html#custom-installation-locations

Comment 2 Bengt Månsson 2024-01-08 18:01:22 UTC
I have this issue too and it prevents me from building https://github.com/aurelienpierreeng/ansel (a clone of darktable).
Hint: Arch Linux had the same issue, but now solved. Fixed upstream. https://bbs.archlinux.org/viewtopic.php?id=287178

Comment 3 Germano Massullo 2024-01-12 15:52:56 UTC
*** Bug 2257782 has been marked as a duplicate of this bug. ***

Comment 4 Germano Massullo 2024-01-12 16:09:33 UTC
Archlinux maintainer fixed the problem at
https://gitlab.archlinux.org/archlinux/packaging/packages/lensfun/-/commit/453fc27057240712d3d3448246bb19c9f092da09
https://gitlab.archlinux.org/archlinux/packaging/packages/lensfun/-/commit/9901f5cc5cb01960f2d8dfc14ef281fd0db32369

Can anybody please make a pull request for Fedora's lensfun? I don't have time to apply such changes in these days

Archlinux's lensfun commit history: https://gitlab.archlinux.org/archlinux/packaging/packages/lensfun/-/commits/main

Comment 5 le.poittevin.laurent 2024-03-17 17:58:53 UTC
Created attachment 2022154 [details]
contents of the two packages python-lensfun-fc38 and python-fc39

the package in question is python3-lensfun, which does not contain all the elements. Just compare the fc38 and fc39 versions of the package.
I used the files contained in the fc38 package on my fedora 39, renaming the python version from 3.11 to 3.12. It works fine.
I've attached a screenshot showing the contents of the two packages python-lensfun-fc38 and python-fc39 . You can clearly see the difference.


Note You need to log in before you can comment on or make changes to this bug.