You are not logged in.

#1 2021-11-29 20:00:26

RKarim
Member
Registered: 2021-11-29
Posts: 1

Broken Pip

After updating my system, Pip no longer functions. When attempting to install a package the following occurs:

Defaulting to user installation because normal site-packages is not writeable
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 320, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 121, in resolve
    self._result = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 454, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 319, in resolve
    name, crit = self._merge_into_criterion(r, parent=None)
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 176, in _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/usr/lib/python3.9/site-packages/resolvelib/resolvers.py", line 83, in from_requirement
    if not cands:
  File "/usr/lib/python3.9/site-packages/resolvelib/structs.py", line 124, in __bool__
    return bool(self._sequence)
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 99, in __bool__
    return any(self)
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 220, in iter_index_candidates
    result = self._finder.find_best_candidate(
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 882, in find_best_candidate
    candidates = self.find_all_candidates(project_name)
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 825, in find_all_candidates
    package_links = self.process_project_url(
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 789, in process_project_url
    html_page = self._link_collector.fetch_page(project_url)
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 618, in fetch_page
    return _get_html_page(location, session=self.session)
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 430, in _get_html_page
    resp = _get_html_response(url, session=session)
  File "/usr/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 127, in _get_html_response
    resp = session.get(
  File "/home/rk/.local/lib/python3.9/site-packages/requests/sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.9/site-packages/pip/_internal/network/session.py", line 428, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/home/rk/.local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/rk/.local/lib/python3.9/site-packages/requests/sessions.py", line 697, in send
    r.content
  File "/home/rk/.local/lib/python3.9/site-packages/requests/models.py", line 831, in content
    self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
  File "/home/rk/.local/lib/python3.9/site-packages/requests/models.py", line 753, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/usr/lib/python3.9/site-packages/urllib3/response.py", line 579, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/lib/python3.9/site-packages/urllib3/response.py", line 522, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/usr/lib/python3.9/site-packages/cachecontrol/filewrapper.py", line 96, in read
    self._close()
  File "/usr/lib/python3.9/site-packages/cachecontrol/filewrapper.py", line 76, in _close
    self.__callback(result)
  File "/usr/lib/python3.9/site-packages/cachecontrol/controller.py", line 329, in cache_response
    self.cache.set(
TypeError: set() got an unexpected keyword argument 'expires'

I have been unable to find any information about this error online, nor understand it myself. I have reinstalled 'python-pip' to no avail, I've also reinstalled 'python' itself. Help would be appreciated.

Thanks,
RK

Offline

#2 2021-11-29 20:19:27

arojas
Developer
From: Spain
Registered: 2011-10-09
Posts: 2,150

Re: Broken Pip

Unrelated to your issue, but you are mixing up system and locally installed pip packages. Don't do that.

Offline

#3 2021-11-29 22:05:30

evilcrash
Member
Registered: 2021-11-29
Posts: 3

Re: Broken Pip

You aren't the only one, fortunately. I'm getting the exact same output of any pip install and I just installed pip myself. I'm relieved to know this is isn't something on my end, but I still want a solution.

Offline

#4 2021-11-30 03:51:25

pfunkman
Member
Registered: 2021-11-30
Posts: 1

Re: Broken Pip

I would try updating again. I had the same problem after updating this morning, but it was resolved after updating again this evening. More specifically, I believe it was updating python-cachecontrol to  0.12.10-1 that caused the problem, and a further update to 1:0.12.6-1 that fixed the problem. It's likely this issue https://github.com/ionrock/cachecontrol/issues/262 , so I guess any version greater than 0.12.6 could be affected.

Offline

#5 2021-11-30 21:18:05

evilcrash
Member
Registered: 2021-11-29
Posts: 3

Re: Broken Pip

I can verify a quick pacman -Syu fixed the problem.

Offline

#6 2021-12-04 01:46:35

ehrichweiss
Member
Registered: 2021-12-04
Posts: 4

Re: Broken Pip

I have already done a pacman -Syu but the problem persists for me. Anyone have any insights?

Offline

#7 2021-12-04 01:56:12

evilcrash
Member
Registered: 2021-11-29
Posts: 3

Re: Broken Pip

ehrichweiss wrote:

I have already done a pacman -Syu but the problem persists for me. Anyone have any insights?

I wasn't very thorough in my initial "it works" so I'll try to go in-depth: I noticed the problem, shut down my computer, and read pfunkman's message the next morning. I turned it back on, ran pacman -Syu, and reinstalled pip including its dependencies. My distribution is also EndeavourOS, if that changes anything.

Last edited by evilcrash (2021-12-04 01:59:53)

Offline

#8 2021-12-04 20:40:15

ehrichweiss
Member
Registered: 2021-12-04
Posts: 4

Re: Broken Pip

evilcrash wrote:
ehrichweiss wrote:

I have already done a pacman -Syu but the problem persists for me. Anyone have any insights?

I wasn't very thorough in my initial "it works" so I'll try to go in-depth: I noticed the problem, shut down my computer, and read pfunkman's message the next morning. I turned it back on, ran pacman -Syu, and reinstalled pip including its dependencies. My distribution is also EndeavourOS, if that changes anything.

It must matter because I'm using Arch/Artix and still getting it. I've done everything from reinstalling pip, to downgrading a good portion of python(or at least anything mentioned in the error), and still get the error. There's gotta be something I'm missing but I'll be damned if I know what it is.

Offline

#9 2021-12-04 20:45:10

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

Re: Broken Pip

Neither EndeavourOS nor Artix Linux are supported here. If you are having issues with either of those distributions, please seek support from their respective support channels.


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

#10 2021-12-04 23:35:00

ehrichweiss
Member
Registered: 2021-12-04
Posts: 4

Re: Broken Pip

I figured that since some of my repositories are actually Arch, that it would apply as well. I won't make that assumption again I guess.

For the record,

Here's my diff for /usr/lib/python3.9/site-packages/cachecontrol/controller.py that seems to be a temporary workaround...


332c332
< #                expires=expires_time,
---
>   

Last edited by ehrichweiss (2021-12-04 23:35:28)

Offline

#11 2021-12-07 14:56:11

Pineman13
Member
Registered: 2016-12-04
Posts: 26

Re: Broken Pip

ehrichweiss wrote:

Here's my diff for /usr/lib/python3.9/site-packages/cachecontrol/controller.py that seems to be a temporary workaround...

332c332
< #                expires=expires_time,
---
>   

I can confirm that this fixes the issue for me. Updating or rolling back did not.
God-knows where you found this quickfix. But I am grateful that you did.


WorMzy wrote:

Neither EndeavourOS nor Artix Linux are supported here. If you are having issues with either of those distributions, please seek support from their respective support channels.

I understand your frustration with copious amounts of users from other distros coming in and requesting a fix.
Believe it or not, but Artix resources see their own share of people coming from other distributions. Without disclosing it! And then later on it turns out that their distro isn't even Arch-based! Had a guy with a RedHat and systemd asking for fixes in there the other day. Only he didn't say that he had either of those.

So please. Allow for the people to congregate in here. I, too, am an Artix user.
But I was able to find people with the same issue in here, on Arch forums. And - thanks to this forum - I was able to fix my issue.
But of course, it is very important that users disclose it beforehand - that they aren't on Arch.

Offline

#12 2021-12-07 15:35:08

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,193

Re: Broken Pip

Pineman13 wrote:

I understand your frustration with copious amounts of users from other distros coming in and requesting a fix.
Believe it or not, but Artix resources see their own share of people coming from other distributions. Without disclosing it! And then later on it turns out that their distro isn't even Arch-based! Had a guy with a RedHat and systemd asking for fixes in there the other day. Only he didn't say that he had either of those.

So please. Allow for the people to congregate in here. I, too, am an Artix user.
But I was able to find people with the same issue in here, on Arch forums. And - thanks to this forum - I was able to fix my issue.
But of course, it is very important that users disclose it beforehand - that they aren't on Arch.

Our position is that everyone is welcome in these forums and may participate whether or not they are using Arch Linux -- But....   We cannot and will not provide support for non-Arch systems.  This includes anything that is not an Arch fork, it includes everything that is an Arch fork, and it includes anything that was installed in accordance with third party installers, scripts, youtube videos, or random blogs.   The reason for this is that we do know what decisions were made in the installation.  What is more important, the person seeking help does not know what decisions were made in the installation of their system (they did not make them, and they did not follow our guidance).   We cannot and will not study every random installer, video or guide to figure it out.  We will (firmly) direct such users to take their support questions to the developer of whatever it was they used.

As an Artix user, please, feel free to contribute to threads.  Same goes for users of Gentoo, Slackware, Fedora, Arch Linux Arm, etc....   Insight from other distributions is useful.  But, provide disclosure:  "I am using Artix, and had the same problem.  I fixed it by...".  In this way a valid data point can be introduced without confusing things (and users) if Artix requires a different method of configuring something; or if the fix is not relevant to Arch because of the use of different libraries (for example).

Last edited by ewaller (2021-12-09 15:58:01)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#13 2021-12-09 15:55:03

Pineman13
Member
Registered: 2016-12-04
Posts: 26

Re: Broken Pip

ewaller wrote:

Our position is that everyone is welcome ...

Thank you for these words. They clarify things quite a bit, as well as show me that I mistook a suggestion for a demand of sorts.
I appreciate your position. A lot!
I will bear in mind that the first thing I say when requesting support should be an indication that I'm not on Arch.
And I understand your reasons for this perfectly well. Thank you for taking the time to explain everything.

P. S. And sorry for bumping. Seems like a resolved thread by now, really. But I just didn't want to leave you hanging, after you've replied to my post.

Offline

Board footer

Powered by FluxBB