# Any way to install Paramiko manually

**URL:** <https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460>\
**Category:** Get Help\
**Tags:** ssl, rhel9, paramiko\
**Created:** [November 20, 2023, 6:08am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460 "2023-11-20T06:08:22Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![bacchus21](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bacchus21](https://forum.ansible.com/u/bacchus21)\
**Post date:** [November 20, 2023, 6:08am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/1 "2023-11-20T06:08:22Z")

</div>

Hello, All

While I was running my playbook, I keep getting Paramiko error, so I’m currently trying to install Paramiko. Looks like some SSL connection related issues are happening. Any one have any clues? Or any way to **install Paramiko manually?**

`[root@ansible002 ~]# pip install paramiko`  
`WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`Could not fetch URL https://pypi.org/simple/paramiko/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/paramiko/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))) - skipping`  
`ERROR: Could not find a version that satisfies the requirement paramiko (from versions: none)`  
`ERROR: No matching distribution found for paramiko`  
`Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))) - skipping`  
`[root@ansible002 ~]#`

Thank you for reading, and highly appreciated in case of any input.

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 20, 2023, 12:07pm UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/2 "2023-11-20T12:07:05Z")

</div>

Hello @bacchus21,

This error is quite explicit:

> [@bacchus21](#):
>
> There was a problem confirming the ssl certificate:

So to start with, I’d try this solution on SO:

> <https://stackoverflow.com/questions/49327929/pip-cant-confirm-ssl-certificate>

Let’s see if that helps you.

Cheers!

---

<div class="post-metadata">

**Author:** ![bacchus21](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bacchus21](https://forum.ansible.com/u/bacchus21)\
**Post date:** [November 21, 2023, 7:04am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/3 "2023-11-21T07:04:17Z")

</div>

Hello, @jbericat  
Thank you for looking at my topic.

Actually, I tried the ways the same as your suggestion. But, the issues are still there unforunately.

`[user1@ansible002 ~]$ python -m pip install --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --upgrade pip Defaulting to user installation because normal site-packages is not writeable`  
`Requirement already satisfied: pip in /usr/lib/python3.9/site-packages (21.2.3)`  
`WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pip/`  
`WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pip/`  
`WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pip/`  
`WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pip/`  
`WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pip/`  
`Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))) - skipping`  
`WARNING: Value for scheme.platlib does not match. Please report this to <https://github.com/pypa/pip/issues/10151>`  
`distutils: /home/user1/.local/lib/python3.9/site-packages`  
`sysconfig: /home/user1/.local/lib64/python3.9/site-packages`  
`WARNING: Additional context:`  
`user = True`  
`home = None`  
`root = None`  
`prefix = None`  
`Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))) - skipping`  
`[user1@ansible002 ~]$`

`[user1@ansible002 ~]$ python -m pip install Paramiko --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org`  
`Defaulting to user installation because normal site-packages is not writeable`  
`WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`Could not fetch URL https://pypi.org/simple/paramiko/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/paramiko/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))) - skipping`  
`ERROR: Could not find a version that satisfies the requirement Paramiko (from versions: none)`  
`ERROR: No matching distribution found for Paramiko`  
`Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))) - skipping`  
`[user1@ansible002 ~]$`

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 21, 2023, 8:03am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/4 "2023-11-21T08:03:49Z")

</div>

Hey @bacchus21 now I remember you! We have been trying to workaround something similar the last week. On my mind, the root issue is the same you had before (remember that we applied a workaround to install a collection, but we actually didn’t fix the root cause):

> [@Unexpected playbook error "msg": "the connection plugin 'network\_cli' was not found"](http://forum.ansible.com/t/unexpected-playbook-error-msg-the-connection-plugin-network-cli-was-not-found/2389/5):
>
> Thank you very much again. Unfortunately, the issue is not resolved yet. [root@ansible002 ~]# update-ca-certificates --fresh -bash: update-ca-certificates: command not found [root@ansible002 ~]#

Let’s get back to the point where you were unable to execute `update-ca-certificates`. I remember that you couldn’t do it because the command wasn’t available.

So, try installing the package first. On RHEL9 you can do it this way:

`sudo dnf install ca-certificates`

After that, you should be able to execute these commands:

```bash
sudo update-ca-certificates --fresh
export SSL_CERT_DIR=/etc/ssl/certs

```

Be aware that if you do not install the package first you will get the `command not found error`!

PS: Check-out this link also, it has related info:

> **[Making CA certificates available to Linux command-line tools](https://www.redhat.com/en/blog/ca-certificates-cli)**
>
> All of the well-known graphical web browsers ship with a collection of known and trusted Certificate Authority (CA) certificates, so when you visit a si...

---

<div class="post-metadata">

**Author:** ![bacchus21](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bacchus21](https://forum.ansible.com/u/bacchus21)\
**Post date:** [November 21, 2023, 10:45am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/5 "2023-11-21T10:45:55Z")

</div>

Hello, @jbericat

Thank you very much for your advice. I tried as advised.

`[root@ansible002 ~]# dnf install ca-certificates`  
`Updating Subscription Management repositories.`  
`Last metadata expiration check: 0:48:34 ago on Tue 21 Nov 2023 09:43:40 AM UTC.`  
`Package ca-certificates-2023.2.60_v7.0.306-90.1.el9_2.noarch is already installed. Dependencies resolved.`  
`Nothing to do.`  
`Complete!`  
`[root@ansible002 ~]#`  
**`[root@ansible002 ~]# update-ca-certificates --fresh`**  
**`-bash: update-ca-certificates: command not found`**  
`[root@ansible002 ~]# `

Unfortunately, `update-ca-certificates --fresh` is not working yet.

Regards

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 21, 2023, 10:55am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/6 "2023-11-21T10:55:13Z")

</div>

Sorry for the confusion, I’m so very used to Debian distros… It looks like that in RHEL the appropriate command would be `update-ca-trust` instead

---

<div class="post-metadata">

**Author:** ![bacchus21](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bacchus21](https://forum.ansible.com/u/bacchus21)\
**Post date:** [November 21, 2023, 12:03pm UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/7 "2023-11-21T12:03:46Z")

</div>

@jbericat Thank you again. I tried it already though 😀 But it didn’t go well as expected.

`[root@vmc3ansible002 ~]# dnf install ca-certificates`  
`Updating Subscription Management repositories.`  
`Last metadata expiration check: 2:14:22 ago on Tue 21 Nov 2023 09:43:40 AM UTC.`  
`Package ca-certificates-2023.2.60_v7.0.306-90.1.el9_2.noarch is already installed.`  
`Dependencies resolved.`  
`Nothing to do.`  
`Complete!`  
`[root@vmc3ansible002 ~]# update-ca-trust`  
`[root@vmc3ansible002 ~]# export SSL_CERT_DIR=/etc/ssl/certs`  
`[root@vmc3ansible002 ~]#`  
`[root@vmc3ansible002 ~]# pip install Paramiko`  
`Requirement already satisfied: Paramiko in /usr/local/lib/python3.9/site-packages (3.3.1)`  
`WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pynacl/`  
`WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pynacl/`  
`WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pynacl/`  
`WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pynacl/`  
`WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/pynacl/`  
`Could not fetch URL https://pypi.org/simple/pynacl/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pynacl/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))) - skipping`  
`WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))': /simple/paramiko/`  
`Could not fetch URL https://pypi.org/simple/paramiko/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/paramiko/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))) - skipping`  
`ERROR: Could not find a version that satisfies the requirement pynacl>=1.5 (from paramiko) (from versions: none)`  
`ERROR: No matching distribution found for pynacl>=1.5`  
`Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLZeroReturnError(6, 'TLS/SSL connection has been closed (EOF) (_ssl.c:1129)'))) - skipping`  
`[root@vmc3ansible002 ~]#`

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 21, 2023, 12:17pm UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/8 "2023-11-21T12:17:14Z")

</div>

Okay that’s one of these problems that are hard to workaround, but let’s keep insisting. That’s what I’d do:

**1. Update CA certificates manually (again, but this time we’re gonna reinstall them):**

```auto
dnf reinstall ca-certificates
update-ca-trust

```

**2. re-set SSL/TLS env vars:**

```auto
export SSL_CERT_DIR=/etc/ssl/certs
export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt

```

**3. Check system time and date:**

SSL/TLS connections can fail if the system time is different from the current time. So let’s chech that also

**4. Network issues**

If the issue persists after trying these steps, it might indicate a deeper issue with SSL/TLS configuration or network connectivity problems. You may use a different VM or machine connected to the same network with a fresh RHEL installation, see how does it behave…

I’ll keep thinking to see if I get any more ideas. We could also call for the chivalry, but let’s use all the bullets before doing so

regards!

---

<div class="post-metadata">

**Author:** ![bacchus21](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bacchus21](https://forum.ansible.com/u/bacchus21)\
**Post date:** [November 24, 2023, 1:18am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/9 "2023-11-24T01:18:27Z")

</div>

Hello, @jbericat

Thank you very much for looking at this issue. One question is that I wonder if there are any ways to install manually using paramiko-3.3.1.tar.gz, which I downloaded from [paramiko · PyPI](https://pypi.org/project/paramiko/#files)

Regards

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 24, 2023, 2:36am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/10 "2023-11-24T02:36:47Z")

</div>

Hello @bacchus21 I hope you’re doing well. Of course there is a way. For example:

```auto
pip install --user ./Downloads/PyGUI-2.5.4.tar.gz

```

This will install the package PyGUI manually using the downloaded tar.gz (just adapt the example to your use case). Anyway I doubt this will fix your issue permanently. But if you’re in a hurry, this may save the day for the time being… Until you hit the SSL issue again

Regards

---

<div class="post-metadata">

**Author:** ![bacchus21](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bacchus21](https://forum.ansible.com/u/bacchus21)\
**Post date:** [November 24, 2023, 4:15am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/11 "2023-11-24T04:15:20Z")

</div>

Hello, @jbericat

Thank you very much for your feedback. I’ve already tried to install via your suggested method, but still with the SSL error. Instead, I tried to install the package via our internal repo(like by using proxy). Finally it worked out!!!

`[root@ansible002 .pip]$ pip show paramiko`  
**`Name: paramiko`**  
**`Version: 3.3.1`**  
`Summary: SSH2 protocol library`  
`Home-page: https://paramiko.org`  
`Author: Jeff Forcier`  
`Author-email: jeff@bitprophet.org`  
`License: LGPL`  
`Location: /usr/local/lib/python3.9/site-packages`  
`Requires: pynacl, cryptography, bcrypt`  
`Required-by:`  
`[root@ansible002 .pip]$`

Therefore, I guess this is caused by some network issues. Thank you very much for helping me. Highly appreciated.

---

<div class="post-metadata">

**Author:** ![jbericat](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jbericat/32/627_2.png) [@jbericat](https://forum.ansible.com/u/jbericat)\
**Post date:** [November 24, 2023, 6:48am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/12 "2023-11-24T06:48:23Z")

</div>

Hello @bacchus21 I’m very glad to read that, really. As I said before, these SSL errors sometimes are quite difficult to workaround (I’ve been there a couple of times myself).

May I ask you to tick the solved check on the post you believe it helped the most? Just for housekeeping sake, so this thread appears as solved on the get-help section.

Regards and have a nice weekend ahead!

---

<div class="post-metadata">

**Author:** ![bacchus21](https://avatars.discourse-cdn.com/v4/letter/b/bbe5ce/32.png) [@bacchus21](https://forum.ansible.com/u/bacchus21)\
**Post date:** [November 24, 2023, 7:43am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/13 "2023-11-24T07:43:07Z")

</div>

Hello, @jbericat

> As I said before, these SSL errors sometimes are quite difficult to workaround (I’ve \>been there a couple of times myself).  
> Yes, I totally agree. It’s more likely the issues from system environment than actual patamiko issue.

Thank you very much for your support and help! Have a nice weekend.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [December 24, 2023, 7:43am UTC](https://forum.ansible.com/t/any-way-to-install-paramiko-manually/2460/14 "2023-12-24T07:43:58Z")

</div>

Closed on December 24, 2023, 7:43am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
