pypa/pip

Pip receives SIGABRT when any command other than help is called

myzhang1029 opened this issue · 2 comments

Environment

  • pip version: pip 19.3.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
  • Python version: Python 3.7.3
  • OS: macOS Catalina 10.15.2(19C57)

I have anaconda installed, but this problem only occurs when anaconda is deactivated.(i.e. running the system's pip instead of the anaconda one)
Python and pip are both from the homebrew bottle.

Description

When I run pip, by either python3 -m pip or pip3 to perform an operation other than --version, show, check, config, hash, completion, debug or help, it is aborted by the system.
macOS' python works fine.
I tried to rebuild python with brew reinstall -s python, it didn't solve the problem.

Expected behavior

For example, pip list returns the list of packages I have installed.

How to Reproduce

  1. Get homebrew python3 package
  2. Then run pip list
  3. An error occurs.

Output

[1]    92590 abort      /usr/local/bin/python3 -m pip list

Use lldb to trace python outputs:

Process 79717 stopped
* thread #2, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
    frame #0: 0x00007fff7407b7fa libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff7407b7fa <+10>: jae    0x7fff7407b804            ; <+20>
    0x7fff7407b7fc <+12>: movq   %rax, %rdi
    0x7fff7407b7ff <+15>: jmp    0x7fff74075a89            ; cerror_nocancel
    0x7fff7407b804 <+20>: retq   
Target 0: (Python) stopped.

This StackOverflow post seems similar and may help.

@uranusjr Ah, that seems to be the problem, thanks!