Paramiko: [Mac OS X] Abort trap: 6 - Cannot import paramiko on OS X Catalina

Created on 31 Oct 2019  路  3Comments  路  Source: paramiko/paramiko

$ python3 -c "import paramiko"
Abort trap: 6
Process:               Python [3906]
Path:                  /usr/local/Cellar/python/3.7.4_1/Frameworks/Python.framework/Versions/3.7/Resources/Python.app/Contents/MacOS/Python
Identifier:            Python
Version:               3.7.4 (3.7.4)
Code Type:             X86-64 (Native)
Parent Process:        bash [1472]
Responsible:           Terminal [1469]
User ID:               501

Date/Time:             2019-10-31 09:05:15.732 +0100
OS Version:            Mac OS X 10.15.1 (19B88)
Report Version:        12
Bridge OS Version:     4.1 (17P1081)
Anonymous UUID:        9EB95E57-123A-CE0A-1794-66F5AB908029


Time Awake Since Boot: 1200 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
/usr/lib/libcrypto.dylib
abort() called
Invalid dylib load. Clients should not load the unversioned libcrypto dylib as it does not have a stable ABI.

The last 4 lines seem most relevant. It seems like there is a manual workaround here:

https://stackoverflow.com/questions/58272830/python-crashing-on-macos-10-15-beta-19a582a-with-usr-lib-libcrypto-dylib

But the libcrypto load should be updated with a version number to fix this, it seems.

Most helpful comment

For me pip3 didn't work either, as this resulted in the same error.
I used the trick mentioned in this article:

ln -s /usr/local/Cellar/[email protected]/1.1.1d/lib/libcrypto.dylib /usr/local/lib/libcrypto.dylib
ln -s /usr/local/Cellar/[email protected]/1.1.1d/lib/libssl.dylib /usr/local/lib/libssl.dylib

All 3 comments

It seems like this was fixed in cryptography 2.8:

$ python3 -c "import paramiko"
Abort trap: 6
$ pip3 install cryptography
Requirement already satisfied: cryptography in /usr/local/lib/python3.7/site-packages (2.7)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in /usr/local/lib/python3.7/site-packages (from cryptography) (1.12.3)
Requirement already satisfied: asn1crypto>=0.21.0 in /usr/local/lib/python3.7/site-packages (from cryptography) (0.24.0)
Requirement already satisfied: six>=1.4.1 in /usr/local/lib/python3.7/site-packages (from cryptography) (1.12.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography) (2.19)
$ pip3 install --upgrade cryptography
Collecting cryptography
  Downloading https://files.pythonhosted.org/packages/6b/4a/ce93178469d4460d6b3a5e648fc1a2f426030f3d30a12d7ed4df73d044de/cryptography-2.8-cp34-abi3-macosx_10_6_intel.whl (1.6MB)
     |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 1.6MB 5.8MB/s 
Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/local/lib/python3.7/site-packages (from cryptography) (1.12.3)
Requirement already satisfied, skipping upgrade: six>=1.4.1 in /usr/local/lib/python3.7/site-packages (from cryptography) (1.12.0)
Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python3.7/site-packages (from cffi!=1.11.3,>=1.8->cryptography) (2.19)
Installing collected packages: cryptography
  Found existing installation: cryptography 2.7
    Uninstalling cryptography-2.7:
      Successfully uninstalled cryptography-2.7
Successfully installed cryptography-2.8
$ python3 -c "import paramiko"
$

(Issue can be closed - maybe cryptography 2.8 should be required)

To fix the issue, run:

pip3 install --upgrade cryptography

pip3 install --upgrade cryptography

Resolved my issue. Thanks for the help.

For me pip3 didn't work either, as this resulted in the same error.
I used the trick mentioned in this article:

ln -s /usr/local/Cellar/[email protected]/1.1.1d/lib/libcrypto.dylib /usr/local/lib/libcrypto.dylib
ln -s /usr/local/Cellar/[email protected]/1.1.1d/lib/libssl.dylib /usr/local/lib/libssl.dylib
Was this page helpful?
0 / 5 - 0 ratings

Related issues

twr14152 picture twr14152  路  4Comments

ssbarnea picture ssbarnea  路  3Comments

jacky15 picture jacky15  路  5Comments

ShaneC-C-Y picture ShaneC-C-Y  路  3Comments

erikalfthan picture erikalfthan  路  6Comments