Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 891333 - app-admin/system-config-printer-1.5.18 emerge failed (packaging.version.InvalidVersion: Invalid version: '3.10.1.gentoo2.9')
Summary: app-admin/system-config-printer-1.5.18 emerge failed (packaging.version.Inval...
Status: RESOLVED DUPLICATE of bug 891331
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Maciej Mrozowski
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 891359
  Show dependency tree
 
Reported: 2023-01-18 19:10 UTC by Zentoo
Modified: 2023-02-10 19:28 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.log,20.51 KB, text/x-log)
2023-01-18 19:11 UTC, Zentoo
Details
full emerge log (app-admin:system-config-printer-1.5.18:20230118-181716.log.gz,9.40 KB, application/gzip)
2023-01-18 19:11 UTC, Zentoo
Details
root env (env,4.04 KB, application/x-shellscript)
2023-01-18 20:44 UTC, Zentoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zentoo 2023-01-18 19:10:45 UTC
app-admin/system-config-printer-1.5.18 emerge failed with this output:

/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
TEST FAILED: /gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/image/usr/lib/python3.10/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:

    /gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/image/usr/lib/python3.10/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


Please make the appropriate changes for your system and try again.
Traceback (most recent call last):
  File "/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18/setup.py", line 21, in <module>
    setup(name='cupshelpers',
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1208, in run_command
    super().run_command(command)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.10/site-packages/setuptools/command/install.py", line 74, in run
    self.do_egg_install()
  File "/usr/lib/python3.10/site-packages/setuptools/command/install.py", line 117, in do_egg_install
    cmd.ensure_finalized()  # finalize before bdist_egg munges install cmd
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 311, in finalize_options
    self.local_index = Environment(self.shadow_path + sys.path)
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1044, in __init__
    self.scan(search_path)
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1077, in scan
    self.add(dist)
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1096, in add
    dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2631, in hashcmp
    self.parsed_version,
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2678, in parsed_version
    self._parsed_version = parse_version(self.version)
  File "/usr/lib/python3.10/site-packages/packaging/version.py", line 266, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '3.10.1.gentoo2.9'
make[2]: *** [Makefile:1958: install-exec-local] Error 1
make[2]: Leaving directory '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18'
make[1]: *** [Makefile:1755: install-am] Error 2
make[1]: Leaving directory '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18'
make: *** [Makefile:1273: install-recursive] Error 1
 * ERROR: app-admin/system-config-printer-1.5.18::gentoo failed (install phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=app-admin/system-config-printer-1.5.18::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-admin/system-config-printer-1.5.18::gentoo'`.
 * The complete build log is located at '/gentoo/log/portage/app-admin:system-config-printer-1.5.18:20230118-190835.log.gz'.
 * The ebuild environment file is located at '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/temp/environment'.
 * Working directory: '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18'
 * S: '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18'
 * QA Notice: setuptools warnings detected:
 *
 * 	easy_install command is deprecated. Use build and pip and other standards-based tools.

>>> Failed to emerge app-admin/system-config-printer-1.5.18

Reproducible: Always

Steps to Reproduce:
emerge -av =app-admin/system-config-printer-1.5.18
Actual Results:  

/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
TEST FAILED: /gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/image/usr/lib/python3.10/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:

    /gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/image/usr/lib/python3.10/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


Please make the appropriate changes for your system and try again.
Traceback (most recent call last):
  File "/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18/setup.py", line 21, in <module>
    setup(name='cupshelpers',
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.10/site-packages/setuptools/dist.py", line 1208, in run_command
    super().run_command(command)
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.10/site-packages/setuptools/command/install.py", line 74, in run
    self.do_egg_install()
  File "/usr/lib/python3.10/site-packages/setuptools/command/install.py", line 117, in do_egg_install
    cmd.ensure_finalized()  # finalize before bdist_egg munges install cmd
  File "/usr/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python3.10/site-packages/setuptools/command/easy_install.py", line 311, in finalize_options
    self.local_index = Environment(self.shadow_path + sys.path)
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1044, in __init__
    self.scan(search_path)
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1077, in scan
    self.add(dist)
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1096, in add
    dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2631, in hashcmp
    self.parsed_version,
  File "/usr/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2678, in parsed_version
    self._parsed_version = parse_version(self.version)
  File "/usr/lib/python3.10/site-packages/packaging/version.py", line 266, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '3.10.1.gentoo2.9'
make[2]: *** [Makefile:1958: install-exec-local] Error 1
make[2]: Leaving directory '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18'
make[1]: *** [Makefile:1755: install-am] Error 2
make[1]: Leaving directory '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18'
make: *** [Makefile:1273: install-recursive] Error 1
 * ERROR: app-admin/system-config-printer-1.5.18::gentoo failed (install phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=app-admin/system-config-printer-1.5.18::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-admin/system-config-printer-1.5.18::gentoo'`.
 * The complete build log is located at '/gentoo/log/portage/app-admin:system-config-printer-1.5.18:20230118-190835.log.gz'.
 * The ebuild environment file is located at '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/temp/environment'.
 * Working directory: '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18'
 * S: '/gentoo/tmp/portage/app-admin/system-config-printer-1.5.18/work/system-config-printer-1.5.18'
 * QA Notice: setuptools warnings detected:
 *
 * 	easy_install command is deprecated. Use build and pip and other standards-based tools.

>>> Failed to emerge app-admin/system-config-printer-1.5.18
Comment 1 Zentoo 2023-01-18 19:11:14 UTC
Created attachment 848781 [details]
emerge --info
Comment 2 Zentoo 2023-01-18 19:11:28 UTC
Created attachment 848783 [details]
full emerge log
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-18 19:16:08 UTC
This is the second Python package you've had a similar issue with
```
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '3.10.1.gentoo2.9'
make[2]: *** [Makefile:1958: install-exec-local] Error 1
```

Where is 'gentoo2.9' coming from? (It may or may not correspond to the baselayout version).

Please share the output of 'env'. Do you have any Python environment variables set? Have you installed things via pip outside of a venv?
Comment 4 Zentoo 2023-01-18 20:43:55 UTC
(In reply to Sam James from comment #3)
> This is the second Python package you've had a similar issue with
> ```
>     raise InvalidVersion(f"Invalid version: '{version}'")
> packaging.version.InvalidVersion: Invalid version: '3.10.1.gentoo2.9'
> make[2]: *** [Makefile:1958: install-exec-local] Error 1
> ```

yes similar problem with net-analyzer/nagstamon

> Where is 'gentoo2.9' coming from? (It may or may not correspond to the
> baselayout version).

It is baselayout version :  sys-apps/baselayout-2.9

$ cat /etc/os-release
NAME=Gentoo
ID=gentoo
PRETTY_NAME="Gentoo Linux"
ANSI_COLOR="1;32"
HOME_URL="https://www.gentoo.org/"
SUPPORT_URL="https://www.gentoo.org/support/"
BUG_REPORT_URL="https://bugs.gentoo.org/"
VERSION_ID="2.9"

> 
> Please share the output of 'env'. Do you have any Python environment
> variables set? Have you installed things via pip outside of a venv?

No pip stuff under root account.
I add my root env as attachment.
Comment 5 Zentoo 2023-01-18 20:44:09 UTC
Created attachment 848787 [details]
root env
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-01-19 01:25:47 UTC
Thanks, it's setuptools-66.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-02-10 19:28:09 UTC
Well, the problem comes from nagstamon being installed with invalid version, and there's nothing system-config-printer can do about that.

*** This bug has been marked as a duplicate of bug 891331 ***