pipのエラーの解決方法

2018年12月19日 - 未分類

Raspberry pi Stretchのpip3でtensorflowをインストールしようとした時にエラーが出ました。いろいろと解決策を試した結果、解決方法が見つかりました。

エラーの状態

$ pip3 install tensorflow

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

Collecting tensorflow

  Could not fetch URL https://pypi.python.org/simple/tensorflow/: There was a problem confirming the ssl certificate: Can’t connect to HTTPS URL because the SSL module is not available. – skipping

  Could not fetch URL https://www.piwheels.org/simple/tensorflow/: There was a problem confirming the ssl certificate: Can’t connect to HTTPS URL because the SSL module is not available. – skipping

  Could not find a version that satisfies the requirement tensorflow (from versions: )

No matching distribution found for tensorflow

 

解決方法

$ mkdir ~/.pip

$ vi ~/.pip/pip.conf

[global]

trusted-host = pypi.python.org

               pypi.org

               files.pythonhosted.org

を作成すると、何事もなかったようにインストールできる。

参考

OpenCV 3.4.4もインストールできる。ソースをコンパイルするよりも楽。

$ sudo apt-get install libopencv-dev python-opencv python-picamera ffmpeg

$ sudo pip3 install install opencv-python

$  sudo pip3 install install opencv-contrib-python

 

ROSもニューラルネットも、バージョンの不整合で、すぐ動かなくなる。。。

Translate »