Python IDLE not installing Error msg

Trying to install IDLe
here’s the output
> sherab@kelsang-librem13v4:~/pycharm-edu-2020.2.1/bin$ $ sudo apt-get install idle

    Could not find the database of available applications, run update-command-not-found as root to fix this
    Sorry, command-not-found has crashed! Please file a bug report at:
    http://www.debian.org/Bugs/Reporting
    Please include the following information with the report:
command-not-found version: 0.3
Python version: 3.7.3 final 0
Distributor ID:	PureOS
Description:	PureOS
Release:	9.0
Codename:	amber
Exception information:

local variable 'cnf' referenced before assignment
Traceback (most recent call last):
  File "/usr/share/command-not-found/CommandNotFound/util.py", line 23, in crash_guard
    callback()
  File "/usr/lib/command-not-found", line 93, in main
    if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:
UnboundLocalError: local variable 'cnf' referenced before assignment

Any suggestions??

edited:
the sudo su update-command-not-found
did not work

did you update the repositories before install?
sudo apt update
then
sudo apt install idle

Thank you.
It worked
the problem was the install command I used
Cheers