You are not logged in.

#1 2021-04-20 22:04:06

jfk
Member
Registered: 2017-12-11
Posts: 131

[SOLVED] Error while building with python

I am trying to install an AUR PKGBUILD with yay but I got this while building with python:

RuntimeError: Requests dependency 'chardet' must be version >= 3.0.2, < 3.1.0!

Surprisingly my python-chardet is up-to-date (4.0.0-1) as well as python-requests (2.25.1-1).

Any idea what could cause this error?

Last edited by jfk (2021-04-20 23:33:34)

Offline

#2 2021-04-20 22:09:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,527

Re: [SOLVED] Error while building with python

Well, it wants 3.0.2 < chardet < 3.1.0, but (checks calculator…) yup: 4.0.0 > 3.1.0
What is "an AUR program"?

Offline

#3 2021-04-20 22:21:56

jfk
Member
Registered: 2017-12-11
Posts: 131

Re: [SOLVED] Error while building with python

Sorry "program" is unfortunate, I meant a PKGBUILD.

I indeed forgot a premise: maintainer told me python-requests (2.25.1-1) supported chardet (4.0.0-1).

Last edited by jfk (2021-04-20 22:22:18)

Offline

#4 2021-04-20 22:34:53

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,527

Re: [SOLVED] Error while building with python

No, I meant "which AUR package do you try to install"?

The repo requests has "chardet >= 3.0.2, < 5.0.0", so the error string isn't coming from there.
It's either an issue w/ the AUR package or you already have a dated package installed (eg. via PIP) - or maybe it's python2, didn't bother to look at that.
Did bother, same for python2.

Last edited by seth (2021-04-20 22:36:35)

Offline

#5 2021-04-20 22:45:25

jfk
Member
Registered: 2017-12-11
Posts: 131

Re: [SOLVED] Error while building with python

OK I see.

I'm trying to install briar-gtk.

I get the same error with the git one.

Last edited by jfk (2021-04-20 22:45:42)

Offline

#6 2021-04-20 22:50:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,527

Re: [SOLVED] Error while building with python

pip list

?

Offline

#7 2021-04-20 22:51:51

loqs
Member
Registered: 2014-03-06
Posts: 19,015

Re: [SOLVED] Error while building with python

Please post the full output from makepkg of the failing build.

Offline

#8 2021-04-20 22:54:49

jfk
Member
Registered: 2017-12-11
Posts: 131

Re: [SOLVED] Error while building with python

pip list:

 Traceback (most recent call last):
  File "/home/fabien/.local/lib/python3.9/site-packages/requests/__init__.py", line 66, in <module>
    assert major == 3
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/pip", line 33, in <module>
    sys.exit(load_entry_point('pip==20.3.1', 'console_scripts', 'pip')())
  File "/usr/bin/pip", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib/python3.9/importlib/metadata.py", line 77, in load
    module = import_module(match.group('module'))
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 790, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/cmdoptions.py", line 23, in <module>
    from pip._vendor.packaging.utils import canonicalize_name
  File "/usr/lib/python3.9/site-packages/pip/_vendor/__init__.py", line 62, in <module>
    vendored("cachecontrol")
  File "/usr/lib/python3.9/site-packages/pip/_vendor/__init__.py", line 33, in vendored
    __import__(modulename, globals(), locals(), level=0)
  File "/usr/lib/python3.9/site-packages/cachecontrol/__init__.py", line 9, in <module>
    from .wrapper import CacheControl
  File "/usr/lib/python3.9/site-packages/cachecontrol/wrapper.py", line 1, in <module>
    from .adapter import CacheControlAdapter
  File "/usr/lib/python3.9/site-packages/cachecontrol/adapter.py", line 5, in <module>
    from requests.adapters import HTTPAdapter
  File "/home/fabien/.local/lib/python3.9/site-packages/requests/__init__.py", line 70, in <module>
    raise RuntimeError('Requests dependency \'chardet\' must be version >= 3.0.2, < 3.1.0!')
RuntimeError: Requests dependency 'chardet' must be version >= 3.0.2, < 3.1.0!

Full output:

Traceback (most recent call last):
  File "/home/fabien/.local/lib/python3.9/site-packages/requests/__init__.py", line 66, in <module>
    assert major == 3
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/usr/lib/python3.9/site-packages/flit/__init__.py", line 12, in <module>
    from .config import ConfigError
  File "/usr/lib/python3.9/site-packages/flit/config.py", line 5, in <module>
    from .validate import validate_config
  File "/usr/lib/python3.9/site-packages/flit/validate.py", line 9, in <module>
    import requests
  File "/home/fabien/.local/lib/python3.9/site-packages/requests/__init__.py", line 70, in <module>
    raise RuntimeError('Requests dependency \'chardet\' must be version >= 3.0.2, < 3.1.0!')
RuntimeError: Requests dependency 'chardet' must be version >= 3.0.2, < 3.1.0!

Last edited by jfk (2021-04-20 22:57:22)

Offline

#9 2021-04-20 22:56:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,527

Re: [SOLVED] Error while building with python

Please use "code" tags.

What do you read there?

Offline

#10 2021-04-20 22:58:50

jfk
Member
Registered: 2017-12-11
Posts: 131

Re: [SOLVED] Error while building with python

seth wrote:

Please use "code" tags.

What do you read there?

Sorry I mixed up the code with the AUR comments section (btw uniformity could be helpful here).

Last edited by jfk (2021-04-20 22:59:42)

Offline

#11 2021-04-20 23:00:34

loqs
Member
Registered: 2014-03-06
Posts: 19,015

Re: [SOLVED] Error while building with python

jfk wrote:

I am trying to install an AUR PKGBUILD with yay but I got this while building with python:

RuntimeError: Requests dependency 'chardet' must be version >= 3.0.2, < 3.1.0!

Surprisingly my python-chardet is up-to-date (4.0.0-1) as well as python-requests (2.25.1-1).

Any idea what could cause this error?

  File "/home/fabien/.local/lib/python3.9/site-packages/requests/__init__.py", line 70, in <module>
    raise RuntimeError('Requests dependency \'chardet\' must be version >= 3.0.2, < 3.1.0!')

Offline

#12 2021-04-20 23:01:05

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,527

Re: [SOLVED] Error while building with python

Nono. What do *you* read there?
Which "requests" package is resolved? Anything suspicious about that?
Do you think that was installed by pacman?

Edit: spoil spot tongue

Last edited by seth (2021-04-20 23:01:31)

Offline

#13 2021-04-20 23:10:52

jfk
Member
Registered: 2017-12-11
Posts: 131

Re: [SOLVED] Error while building with python

OK so if I follow correctly there's a conflict between /home/fabien/.local/lib/python3.9/site-packages/requests/__init__.py that would have been placed there following a manual install and the build with pacman?

Offline

#14 2021-04-20 23:21:16

loqs
Member
Registered: 2014-03-06
Posts: 19,015

Re: [SOLVED] Error while building with python

Yes the old requests package in your user directory is taking precedence over that provided by python-requests.  Breaking the use of system pip.

Offline

#15 2021-04-20 23:33:49

jfk
Member
Registered: 2017-12-11
Posts: 131

Re: [SOLVED] Error while building with python

Perfect, thank you to you both.

Offline

Board footer

Powered by FluxBB