You are not logged in.
When installing some Python packages from AUR (such as python-hydra-core and python-transformers), I am getting the following error during the wheel creation process (same error for all afflicted packages):
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/build/__main__.py", line 375, in main
built = build_call(
File "/usr/lib/python3.10/site-packages/build/__main__.py", line 208, in build_package
out = _build(isolation, builder, outdir, distribution, config_settings, skip_dependency_check)
File "/usr/lib/python3.10/site-packages/build/__main__.py", line 147, in _build
return _build_in_current_env(builder, outdir, distribution, config_settings, skip_dependency_check)
File "/usr/lib/python3.10/site-packages/build/__main__.py", line 127, in _build_in_current_env
missing = builder.check_dependencies(distribution)
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 369, in check_dependencies
return {u for d in dependencies for u in check_dependency(d)}
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 369, in <setcomp>
return {u for d in dependencies for u in check_dependency(d)}
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 185, in check_dependency
yield from check_dependency(other_req_string, ancestral_req_strings + (normalised_req_string,), req.extras)
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 185, in check_dependency
yield from check_dependency(other_req_string, ancestral_req_strings + (normalised_req_string,), req.extras)
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 185, in check_dependency
yield from check_dependency(other_req_string, ancestral_req_strings + (normalised_req_string,), req.extras)
[Previous line repeated 1 more time]
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 179, in check_dependency
if req.specifier and not req.specifier.contains(dist.version, prereleases=True):
File "/usr/lib/python3.10/site-packages/packaging/specifiers.py", line 902, in contains
item = Version(item)
File "/usr/lib/python3.10/site-packages/packaging/version.py", line 195, in __init__
match = self._regex.search(version)
TypeError: expected string or bytes-like objectTypical solutions, like cleaning the build cache or uninstalling the old version of the package, haven't helped. Please advise. TIA.
Last edited by mindbound (2023-02-23 16:24:57)
Offline
python-hydra-core was updated yesterday and builds fine here after changing default java version to 11* .
Try again with that version, post full build log if it still fails.
* Had it set to java-8 for some tests with another aur package .
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
I don't think there's anything wrong with any of the packages (another one that fails to build for me is python-aesara, which I know builds correctly on another Arch machine), this seems to be some kind of problem with my Python installation. All of these packages fail to build with exactly the same traceback.
Last edited by mindbound (2023-02-23 10:47:29)
Offline
The traceback could be merely a symptom while the real cause is in an earlier part of the log .
It does suggest something is wrong with your python install, but there's not enough info about your system to do more then guess what causes it.
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
That seems to be the entire log. The full output of
yay -S pkglog(another package that fails to build in this exact way) is as follows:
$ yay -S pkglog
:: Checking for conflicts...
:: Checking for inner conflicts...
[Aur:1] pkglog-1.20-1
:: (1/1) Downloaded PKGBUILD: pkglog
1 pkglog (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==>
:: (1/1) Parsing SRCINFO: pkglog
==> Making package: pkglog 1.20-1 (Thu 23 Feb 2023 01:01:49 PM EET)
==> Retrieving sources...
-> Downloading pkglog-1.20.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 8994 0 8994 0 0 15651 0 --:--:-- --:--:-- --:--:-- 15651
==> Validating source files with sha1sums...
pkglog-1.20.tar.gz ... Passed
==> Making package: pkglog 1.20-1 (Thu 23 Feb 2023 01:01:51 PM EET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found pkglog-1.20.tar.gz
==> Validating source files with sha1sums...
pkglog-1.20.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting pkglog-1.20.tar.gz with bsdtar
==> Sources are ready.
==> Making package: pkglog 1.20-1 (Thu 23 Feb 2023 01:01:52 PM EET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
* Getting build dependencies for wheel...
running egg_info
creating pkglog.egg-info
writing pkglog.egg-info/PKG-INFO
writing dependency_links to pkglog.egg-info/dependency_links.txt
writing entry points to pkglog.egg-info/entry_points.txt
writing requirements to pkglog.egg-info/requires.txt
writing top-level names to pkglog.egg-info/top_level.txt
writing manifest file 'pkglog.egg-info/SOURCES.txt'
reading manifest file 'pkglog.egg-info/SOURCES.txt'
writing manifest file 'pkglog.egg-info/SOURCES.txt'
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/build/__main__.py", line 375, in main
built = build_call(
File "/usr/lib/python3.10/site-packages/build/__main__.py", line 208, in build_package
out = _build(isolation, builder, outdir, distribution, config_settings, skip_dependency_check)
File "/usr/lib/python3.10/site-packages/build/__main__.py", line 147, in _build
return _build_in_current_env(builder, outdir, distribution, config_settings, skip_dependency_check)
File "/usr/lib/python3.10/site-packages/build/__main__.py", line 127, in _build_in_current_env
missing = builder.check_dependencies(distribution)
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 369, in check_dependencies
return {u for d in dependencies for u in check_dependency(d)}
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 369, in <setcomp>
return {u for d in dependencies for u in check_dependency(d)}
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 185, in check_dependency
yield from check_dependency(other_req_string, ancestral_req_strings + (normalised_req_string,), req.extras)
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 185, in check_dependency
yield from check_dependency(other_req_string, ancestral_req_strings + (normalised_req_string,), req.extras)
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 185, in check_dependency
yield from check_dependency(other_req_string, ancestral_req_strings + (normalised_req_string,), req.extras)
[Previous line repeated 1 more time]
File "/usr/lib/python3.10/site-packages/build/__init__.py", line 179, in check_dependency
if req.specifier and not req.specifier.contains(dist.version, prereleases=True):
File "/usr/lib/python3.10/site-packages/packaging/specifiers.py", line 902, in contains
item = Version(item)
File "/usr/lib/python3.10/site-packages/packaging/version.py", line 195, in __init__
match = self._regex.search(version)
TypeError: expected string or bytes-like object
ERROR expected string or bytes-like object
==> ERROR: A failure occurred in build().
Aborting...
-> error making: pkglogOffline
It does seem to abort very soon in the build process.
What is the output of
$ pacman -Qkk python-packaging
$ type python?
When was your last pacman -Syu (if unsure, search in /var/log/pacman.log ) .
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
$ pacman -Qkk python-packaging
python-packaging: 53 total files, 0 altered files
$ type python
python is /usr/bin/pythonLast pacman -Syu was this morning, less than 5 h ago.
Offline
Ok, then i'm almost out of ideas.
Try building one of those packages with makepkg to verify yay is not involved in the problem .
(I don't think it is this time, but it's better to verify)
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
It's not yay, I have already tried building the packages with makepkg. Re-checked just now, getting the same results.
Offline
Moving to AUR issues.
Offline
PIP or Conda getting in the way?
pip list
sudo pip list
printenvCan you https://wiki.archlinux.org/title/Develo … ean_chroot ?
Offline
I can build without errors in a clean chroot.
I don't have a Conda environment active at the moment, so it's likely pip getting in the way somehow.
Last edited by mindbound (2023-02-23 13:09:55)
Offline
PIP or Conda getting in the way?
Offline
pip listoutputs 893 packages, which seems about right for my machine.
How can I start tracking down the issue?
Offline
Are you using them in a virtual environment or installed them "--user"?
Because otherwise that's 893 packages too many.
Edit: https://wiki.archlinux.org/title/Python … management
Last edited by seth (2023-02-23 13:17:20)
Offline
Doesn't pip list also include packages installed from official repositories and AUR as well? Most of these packages have been installed from these sources instead of pip install.
Last edited by mindbound (2023-02-23 13:23:29)
Offline
Indeed ![]()
That's gonna make finding collisions much harder - short of bisecting the installed packages and/or removing all pacman controlled packages and see what's left ![]()
But you hadn't checked
pacman -Qkk python-build python-wheel?
Offline
$ pacman -Qkk python-build python-wheel
python-build: 95 total files, 0 altered files
python-wheel: 58 total files, 0 altered filesOffline
What about
pacman -Qm `pacman -Qqo /usr/lib/python3.10/site-packages/`
pacman -Qkk `pacman -Qqo /usr/lib/python3.10/site-packages/`Offline
pacman -Qm `pacman -Qqo /usr/lib/python3.10/site-packages/`STDOUT: https://pastebin.com/fxaMsuqr
pacman -Qkk `pacman -Qqo /usr/lib/python3.10/site-packages/`STDOUT: https://pastebin.com/Q1kq7tq2
STDERR: https://pastebin.com/WL94fJj2
Offline
https://archlinux.org/packages/communit … ython-lz4/ (and h5py) stick out…
Offline
I reinstalled them (both from the official repos) and there are no more messages about them in the STDERR. The build issues remain the same.
Offline
More investigation results: the build fails specifically during python -m build dependency check (and doesn't fail when the -x/--skip-dependency-check flag is passed).
Should I just go through the _deps list from the package's setup.py and reinstall the dependency packages one by one or is there a more correct way to try and resolve this?
Offline
the build fails specifically during python -m build dependency check
Yes, the backtrace says that. Ultimately because
TypeError: expected string or bytes-like objectbut unless a package in "pip list" has a freakish version … seems to be a thing, though: https://github.com/pypa/build/issues/558
Offline
By hacking the packaging module to output the version before trying to regex search it, it seems that one package is reporting None as the version, which of course can't be parsed and could be the source of the problem.
Now, to figure out how to output the name of that package.
Edit: FIXED. The package in question was typing_extensions that for some reason didn't correctly report its version. I reinstalled it and the build issues seem to be gone. Thanks to everyone who helped me with this.
Last edited by mindbound (2023-02-23 16:25:36)
Offline