前提・実現したいこと
ローカル環境のCentOS7にncclientをpip3でインストールしたい
実現に向けて以下の手順を踏んだ
①Ansible_testサーバにデフォルトで入っているPython2系を3系(3.7.0)へアップグレード
②外部と通信可能なCentOS7(Ansible_testと同じOSバージョンと同じPythonバージョン)でpip3 downloadコマンドでncclientのパッケージをダウンロード(依存関係パッケージも同時にダウンロード)
③Ansible_testサーバへncclientパッケージを格納
④Ansible_testサーバでpip3 install コマンドでncclientのインストール ★ここでエラーが発生
機器情報
[root@Ansible_test ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
[root@Ansible_test ~]# which python3
/usr/local/bin/python3
[root@Ansible_test ~]# python3 -V
Python 3.7.0
[root@Ansible_test ~]#
[root@Ansible_test ~]# pip3 list
Package Version
pip 10.0.1
setuptools 40.8.0
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
[root@Ansible_test ~]#
[root@Ansible_test ~]# cat requirements.txt
ncclient == 0.6.6
[root@Ansible_test ~]#
[root@Ansible_test ~]# ls -la module/
合計 8904
drwxr-xr-x. 2 root root 4096 7月 12 09:51 .
dr-xr-x---. 7 root root 4096 7月 12 09:55 ..
-rw-r--r--. 1 root root 3351016 7月 12 09:51 PyNaCl-1.3.0.tar.gz
-rw-r--r--. 1 root root 104964 7月 12 09:51 asn1crypto-0.24.0.tar.gz
-rw-r--r--. 1 root root 42512 7月 12 09:51 bcrypt-3.1.7.tar.gz
-rw-r--r--. 1 root root 456340 7月 12 09:51 cffi-1.12.3.tar.gz
-rw-r--r--. 1 root root 495877 7月 12 09:51 cryptography-2.7.tar.gz
-rw-r--r--. 1 root root 2488557 7月 12 09:51 lxml-4.3.4.tar.gz
-rw-r--r--. 1 root root 89677 7月 12 09:51 ncclient-0.6.6.tar.gz
-rw-r--r--. 1 root root 1018679 7月 12 09:51 paramiko-2.6.0.tar.gz
-rw-r--r--. 1 root root 158295 7月 12 09:51 pycparser-2.19.tar.gz
-rw-r--r--. 1 root root 849016 7月 12 09:51 setuptools-41.0.1.zip
-rw-r--r--. 1 root root 32725 7月 12 09:51 six-1.12.0.tar.gz
[root@Ansible_test ~]#
発生している問題・エラーメッセージ
[root@Ansible_test ~]# pip3 install --no-index --find-links module --requirement requirements.txt Looking in links: module Collecting ncclient==0.6.6 (from -r requirements.txt (line 1)) Requirement already satisfied: setuptools>0.6 in /usr/local/lib/python3.7/site-packages (from ncclient==0.6.6->-r requirements.txt (line 1)) (40.8.0) Collecting paramiko>=1.15.0 (from ncclient==0.6.6->-r requirements.txt (line 1)) Collecting lxml>=3.3.0 (from ncclient==0.6.6->-r requirements.txt (line 1)) Collecting six (from ncclient==0.6.6->-r requirements.txt (line 1)) Collecting bcrypt>=3.1.3 (from paramiko>=1.15.0->ncclient==0.6.6->-r requirements.txt (line 1)) Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: ) No matching distribution found for setuptools>=40.8.0 [root@Ansible_test ~]#
setuptools 40.8.0があるにもかかわらず上記エラーが出ています。
解決策をご教示頂けないでしょうか。
あなたの回答
tips
プレビュー