You are not logged in.

#1 2025-01-01 01:22:12

heartfoundation
Member
Registered: 2024-12-31
Posts: 1

Due to lib2to3 unable to install a python pkg

Since the Python update to 3.13, I cannot install a QGIS dependency 'python-future' because I'm failing to install 'python-future' dependency 'lib2to3. I read 'lib2to3' is deprecated, and 'python-fissix' is a fork of it(?). Installed 'python-fissix' via git clone successfully. Python-fissix resides in /usr/lib/python3.13/site-packages as pacman -Q also states. Used git clone to obtain 'python-future', but within the 'python-future' directory makepkg yields __ ERROR collecting tests/test_past/test_translation.py _______________________________
ImportError while importing test module '/home/sheep/python-future/src/future-1.0.0/tests/test_past/test_translation.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_past/test_translation.py:21: in <module>
    from past.translation import install_hooks, remove_hooks, common_substring
build/lib/past/translation/__init__.py:44: in <module>
    from lib2to3.pgen2.parse import ParseError
E   ModuleNotFoundError: No module named 'lib2to3'

Am I placing files in wrong directory, or is python pip the alternative route?

Offline

#2 2025-01-02 17:20:38

Dividebysandwich
Member
Registered: 2024-10-01
Posts: 4
Website

Re: Due to lib2to3 unable to install a python pkg

I have the exact same issue.

Offline

#3 2025-01-02 17:47:44

SRG
Member
Registered: 2012-12-09
Posts: 31

Re: Due to lib2to3 unable to install a python pkg

Same problem for me ...

Successfully built future-1.0.0-py3-none-any.whl
==> Starting check()...
============================================================================================================ test session starts ============================================================================================================
platform linux -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0 -- /usr/bin/python
cachedir: .pytest_cache
rootdir: /home/users/sergio/.cache/yay/python-future/src/future-1.0.0
configfile: pytest.ini
plugins: typeguard-4.4.1, anyio-4.7.0
collected 99 items / 1 error                                                                                                                                                                                                                

================================================================================================================== ERRORS ===================================================================================================================
___________________________________________________________________________________________ ERROR collecting tests/test_past/test_translation.py ____________________________________________________________________________________________
ImportError while importing test module '/home/users/sergio/.cache/yay/python-future/src/future-1.0.0/tests/test_past/test_translation.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_past/test_translation.py:21: in <module>
    from past.translation import install_hooks, remove_hooks, common_substring
build/lib/past/translation/__init__.py:44: in <module>
    from lib2to3.pgen2.parse import ParseError
E   ModuleNotFoundError: No module named 'lib2to3'
============================================================================================================= warnings summary ==============================================================================================================
build/lib/future/backports/test/support.py:1945
  /home/users/sergio/.cache/yay/python-future/src/future-1.0.0/build/lib/future/backports/test/support.py:1945: SyntaxWarning: invalid escape sequence '\d'
    m = re.match("2.6.(\d{1,2})", kernel_version)

-- Docs: [url]https://docs.pytest.org/en/stable/how-to/capture-warnings.html[/url]
========================================================================================================== short test summary info ==========================================================================================================
ERROR tests/test_past/test_translation.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
======================================================================================================== 1 warning, 1 error in 0.14s ========================================================================================================
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: python-future-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-future - exit status 4

Last edited by SRG (2025-01-02 22:57:35)

Offline

#4 2025-01-02 21:25:13

seth
Member
Registered: 2012-09-03
Posts: 60,756

Re: Due to lib2to3 unable to install a python pkg

Please use [code][/code] tags, not "quote" tags. Edit your post in this regard.

https://aur.archlinux.org/packages/pyth … nt-1003141 - python-future is dead.

I cannot install a QGIS dependency 'python-future' because

Mind to elaborate?
https://archlinux.org/packages/extra/x86_64/qgis/
What qgis depends on python-future/lib2to3 ?

Offline

#5 2025-01-03 08:20:34

Bastovan
Member
Registered: 2022-12-05
Posts: 1

Re: Due to lib2to3 unable to install a python pkg

I got the same when upgrading:

:: 1 package to upgrade/install.
1  aur/python-future  1.0.0-2 -> 1.0.0-4
==> Packages to exclude: (eg: "1 2 3", "1-3", "^4" or repo name)
 -> Excluding packages may cause partial upgrades and break systems
==>
AUR Dependency (1): python-future-1.0.0-4
...
Successfully built future-1.0.0-py3-none-any.whl
==> Starting check()...
======================================================== test session starts =========================================================
platform linux -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0 -- /usr/bin/python
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/home/bogdan/.cache/yay/python-future/src/future-1.0.0/.hypothesis/examples'))
rootdir: /home/bogdan/.cache/yay/python-future/src/future-1.0.0
configfile: pytest.ini
plugins: xdist-3.6.1, typeguard-4.4.1, anyio-4.7.0, hypothesis-6.123.2
collected 99 items / 1 error

=============================================================== ERRORS ===============================================================
________________________________________ ERROR collecting tests/test_past/test_translation.py ________________________________________
ImportError while importing test module '/home/bogdan/.cache/yay/python-future/src/future-1.0.0/tests/test_past/test_translation.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.13/importlib/__init__.py:88: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_past/test_translation.py:21: in <module>
    from past.translation import install_hooks, remove_hooks, common_substring
build/lib/past/translation/__init__.py:44: in <module>
    from lib2to3.pgen2.parse import ParseError
E   ModuleNotFoundError: No module named 'lib2to3'
========================================================== warnings summary ==========================================================
build/lib/future/backports/test/support.py:1945
  /home/bogdan/.cache/yay/python-future/src/future-1.0.0/build/lib/future/backports/test/support.py:1945: SyntaxWarning: invalid escape sequence '\d'
    m = re.match("2.6.(\d{1,2})", kernel_version)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
====================================================== short test summary info =======================================================
ERROR tests/test_past/test_translation.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================== 1 warning, 1 error in 0.48s =====================================================
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: python-future-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
python-future - exit status 4

Offline

#6 2025-01-03 09:18:08

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 12,560
Website

Re: Due to lib2to3 unable to install a python pkg

Mod note: moving to AUR Issues


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#7 2025-01-03 09:28:20

seth
Member
Registered: 2012-09-03
Posts: 60,756

Re: Due to lib2to3 unable to install a python pkg

Instead of further metoo posts, I'd take a look why python-future is installed itfp.
Try to remove the package, see what blocks it (or whether it was stale) and take that to that client. There's a good chance that a bunch of AUR packages hold it as stale dependency while upstream has already lost it and it's not actually required anymore.
If you indeed ue anything that's basically still python2 and also bitrot, maybe it's time to look for a replacement solution.

Offline

#8 2025-01-03 10:26:09

SRG
Member
Registered: 2012-12-09
Posts: 31

Re: Due to lib2to3 unable to install a python pkg

python-future is mandatory for the AUR "seafile" package. So in my case, it of course canno't be removed at this time. Until now, everything was working / no issues with python-future v1.0.0-2. Problems only appeared with v1.0.0-4.

Offline

#9 2025-01-03 10:31:06

seth
Member
Registered: 2012-09-03
Posts: 60,756

Re: Due to lib2to3 unable to install a python pkg

I was gonna tell you to get glasses, but the stale dependency was removed just 14h ago wink
https://aur.archlinux.org/cgit/aur.git/ … 14f1978c1e

Offline

#10 2025-01-03 12:52:04

SRG
Member
Registered: 2012-12-09
Posts: 31

Re: Due to lib2to3 unable to install a python pkg

Indeed ... now it can be removed ... but of course i tried yesterday, and it was failing at that time, due to the still-there-at-that-time seafile dependency.
So problem solved on my side now.

Offline

Board footer

Powered by FluxBB