0

I tried to output top 250 movies according to imdb rating with python. When I type the code as in the following screenshot1

import imdb
ia = imdb.IMDb()
search = ia.get_top250_movies()
for i in range(10):
    print(search[i]) 

It gave me error saying no module imdb. So, I tried to install imdb python file with command pip install imdbpy, but still gave me the error as:

ERROR: Could not find a version that satisfies the requirement imdbpy (from versions: none)
ERROR: No matching distribution found for imdbpy
WARNING: 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
Trenton McKinney
  • 56,955
  • 33
  • 144
  • 158
soul shrestha
  • 127
  • 2
  • 14
  • WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Install the ssl module – Trenton McKinney May 23 '20 at 03:43
  • @TrentonMcKinney : I am really new to programming and trying to learn python in this current situation. So, please bare with me if I ask simple and silly questions. So, as per your instruction, I tried to install SSL with the command: pip install ssl. It is giving me the same error. – soul shrestha May 23 '20 at 03:48
  • Maybe this answer https://stackoverflow.com/questions/45954528/pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl-module-in/57240184 – Trenton McKinney May 23 '20 at 03:49
  • I don't know if it works .Check your system time is up to date or not , just in case. – McLovin May 23 '20 at 03:59
  • @Solen'ya my system time is up to date – soul shrestha May 23 '20 at 03:59
  • How did you install python? Just downloaded python or is this anaconda or something else? What OS? – Trenton McKinney May 23 '20 at 04:00
  • @TrentonMcKinney it is anaconda – soul shrestha May 23 '20 at 04:02
  • Try `conda update conda` then `conda update --all` and the anaconda prompt. – Trenton McKinney May 23 '20 at 04:03
  • Also try `conda update openssl` and or `conda upgrade openssl`. – Trenton McKinney May 23 '20 at 15:26
  • [“ssl module in Python is not available” when installing package with pip3](https://stackoverflow.com/questions/41328451/ssl-module-in-python-is-not-available-when-installing-package-with-pip3) – Trenton McKinney May 23 '20 at 15:27
  • One other note, if you have multiple installations of python, for instance a system python and another from Anaconda, make sure you are using the the Anaconda prompt. – Trenton McKinney May 23 '20 at 15:29
  • It could possibly a duplicate of https://stackoverflow.com/questions/41328451/ssl-module-in-python-is-not-available-when-installing-package-with-pip3 As Trenton McKinney said you should try upgrading the anaconda. The problem arises because you don't have SSL support installed, you would need to install the OpenSSL for Python. – gutsytechster May 23 '20 at 07:30

0 Answers0