Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command pip list --outdated fails #5275

Closed
Xohwie1i opened this issue May 11, 2020 · 7 comments
Closed

command pip list --outdated fails #5275

Xohwie1i opened this issue May 11, 2020 · 7 comments

Comments

@Xohwie1i
Copy link

Problem description
Running pip list --outdated fails with the following error:

ERROR: Exception:
Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.8/multiprocessing/synchronize.py", line 28, in <module>
    from _multiprocessing import SemLock, sem_unlink
ImportError: cannot import name 'SemLock' from '_multiprocessing' (/data/data/com.termux/files/usr/lib/python3.8/lib-dynload/_multiprocessing.cpython-38.so)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
    status = self.run(options, args)
  File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pip/_internal/commands/list.py", line 160, in run
    packages = self.get_outdated(packages, options)
  File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pip/_internal/commands/list.py", line 167, in get_outdated
    return [
  File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pip/_internal/commands/list.py", line 167, in <listcomp>
    return [
  File "/data/data/com.termux/files/usr/lib/python3.8/site-packages/pip/_internal/commands/list.py", line 216, in iter_packages_latest_infos
    pool = Pool(DEFAULT_POOLSIZE)
  File "/data/data/com.termux/files/usr/lib/python3.8/multiprocessing/dummy/__init__.py", line 124, in Pool
    return ThreadPool(processes, initializer, initargs)
  File "/data/data/com.termux/files/usr/lib/python3.8/multiprocessing/pool.py", line 922, in __init__
    Pool.__init__(self, processes, initializer, initargs)
  File "/data/data/com.termux/files/usr/lib/python3.8/multiprocessing/pool.py", line 196, in __init__
    self._change_notifier = self._ctx.SimpleQueue()
  File "/data/data/com.termux/files/usr/lib/python3.8/multiprocessing/context.py", line 113, in SimpleQueue
    return SimpleQueue(ctx=self.get_context())
  File "/data/data/com.termux/files/usr/lib/python3.8/multiprocessing/queues.py", line 336, in __init__
    self._rlock = ctx.Lock()
  File "/data/data/com.termux/files/usr/lib/python3.8/multiprocessing/context.py", line 67, in Lock
    from .synchronize import Lock
  File "/data/data/com.termux/files/usr/lib/python3.8/multiprocessing/synchronize.py", line 30, in <module>
    raise ImportError("This platform lacks a functioning sem_open" +
ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770.

Steps to reproduce
run pip list --outdated

Expected behavior
Should output outdated python packages

@Grimler91
Copy link
Member

Happens with pip 20.1, downgrading to 20.0.X works. Discussed previously in #5222 and linked issues

@landfillbaby
Copy link
Member

in case you're curious, the next release of pip will have a fix for this, pypa/pip#8167 is the fix, already merged into master

@voidzero
Copy link

Until this gets pushed to the repos, how can I downgrade pip?

@landfillbaby
Copy link
Member

landfillbaby commented May 14, 2020

pip install pip==20.0.2
or you could do what I've done and manually apply the patch from the PR mentioned above to your local pip 20.1 installation

@voidzero
Copy link

Ah, perfect. Thank you!

@landfillbaby
Copy link
Member

landfillbaby commented May 14, 2020

also for future-proof checking of pip upgrades:
pip install -U pip!=20.1
currently also just installs 20.0.2 but will install the future fixed version as well, after which you can go back to normal

@landfillbaby
Copy link
Member

pip 20.1.1 is out! this issue is fixed

@ghost ghost closed this as completed Jun 7, 2020
@ghost ghost locked and limited conversation to collaborators Oct 9, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants