LoginSignup
2
0

More than 1 year has passed since last update.

vscodeでpip installをすると出てくるSSLエラーを倒した!

Last updated at Posted at 2022-05-12

発生したエラー

PS C:\Users\bk21009\Desktop\Python files> pip install pyocr
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Requirement already satisfied: pyocr in c:\users\bk21009\anaconda3\lib\site-packages (0.8.2)
Requirement already satisfied: Pillow in c:\users\bk21009\anaconda3\lib\site-packages (from pyocr) (8.2.0)
PS C:\Users\bk21009\Desktop\Python files> pip install googletrans
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/googletrans/
Could not fetch URL https://pypi.org/simple/googletrans/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/googletrans/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement googletrans
ERROR: No matching distribution found for googletrans

調べても自分にはさっぱりだったのでおとなしく知り合いに聞くことに。

解決方法

ターミナルのこのプルダウンメニューから
Command Promptを選択するだけ

ここの
unknown4.png

これを押す
unknown5.png

できた!

C:\Users\bk21009\Desktop\Python files>conda activate base

(base) C:\Users\bk21009\Desktop\Python files>pip install googletrans
Collecting googletrans
  Downloading googletrans-3.0.0.tar.gz (17 kB)
Collecting httpx==0.13.3
  Downloading httpx-0.13.3-py3-none-any.whl (55 kB)
     |████████████████████████████████| 55 kB 451 kB/s
Requirement already satisfied: sniffio in c:\users\bk21009\anaconda3\lib\site-packages (from httpx==0.13.3->googletrans) (1.2.0)
Collecting hstspreload
  Downloading hstspreload-2021.12.1-py3-none-any.whl (1.3 MB)
     |████████████████████████████████| 1.3 MB 297 kB/s
Requirement already satisfied: idna==2.* in c:\users\bk21009\anaconda3\lib\site-packages (from httpx==0.13.3->googletrans) 
(2.10)
Requirement already satisfied: certifi in c:\users\bk21009\anaconda3\lib\site-packages (from httpx==0.13.3->googletrans) (2020.12.5)
Collecting chardet==3.*
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
     |████████████████████████████████| 133 kB 504 kB/s
Collecting rfc3986<2,>=1.3
  Downloading rfc3986-1.5.0-py2.py3-none-any.whl (31 kB)
Collecting httpcore==0.9.*
  Downloading httpcore-0.9.1-py3-none-any.whl (42 kB)
     |████████████████████████████████| 42 kB 455 kB/s
Collecting h2==3.*
  Downloading h2-3.2.0-py2.py3-none-any.whl (65 kB)
     |████████████████████████████████| 65 kB 1.7 MB/s
Collecting h11<0.10,>=0.8
  Downloading h11-0.9.0-py2.py3-none-any.whl (53 kB)
     |████████████████████████████████| 53 kB 2.0 MB/s
Collecting hyperframe<6,>=5.2.0
  Downloading hyperframe-5.2.0-py2.py3-none-any.whl (12 kB)
Collecting hpack<4,>=3.0
  Downloading hpack-3.0.0-py2.py3-none-any.whl (38 kB)
Building wheels for collected packages: googletrans
  Building wheel for googletrans (setup.py) ... done
  Created wheel for googletrans: filename=googletrans-3.0.0-py3-none-any.whl size=15734 sha256=458473f547ed13a01c62097d921fe1f53785ec8028b9e835cd3811f5ebc5a1ec
  Stored in directory: c:\users\bk21009\appdata\local\pip\cache\wheels\0e\ce\9b\d51de1064911d42480ab6b57fc943ee36572441f27546354e2
Successfully built googletrans
Installing collected packages: hyperframe, hpack, h2, h11, rfc3986, httpcore, hstspreload, chardet, httpx, googletrans
  Attempting uninstall: chardet
    Found existing installation: chardet 4.0.0
    Uninstalling chardet-4.0.0:
      Successfully uninstalled chardet-4.0.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
spyder 4.2.5 requires pyqt5<5.13, which is not installed.
spyder 4.2.5 requires pyqtwebengine<5.13, which is not installed.
conda-repo-cli 1.0.4 requires pathlib, which is not installed.
anaconda-project 0.9.1 requires ruamel-yaml, which is not installed.
Successfully installed chardet-3.0.4 googletrans-3.0.0 h11-0.9.0 h2-3.2.0 hpack-3.0.0 hstspreload-2021.12.1 httpcore-0.9.1 
httpx-0.13.3 hyperframe-5.2.0 rfc3986-1.5.0

おわりに

無事インストールもできた。なんかエラー出てるけど。
稚拙な記事もいいところだけど、いつかは誰かの助けになるかも、と思いつつ残します。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0