Hello, @PythonBoy. I guess that module is Pillow. -I have also got an error while doing something close to your program in the past and error message was saying something like “Pillow required” - You can see this installation page about installing Pillow.
In your terminal/command prompt you can use this command(if using Windows):
-m pip install --upgrade Pillow
You can see other methods in the page linked above.
Hello @sandraC thanks for the help. But as always I am unlucky I got an error in the command prompt itself. I never expected this type of error to occur.
Error:
Traceback (most recent call last):
File "C:\Users\Can't say\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Can't say\AppData\Local\Programs\Python\Python38-32\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Can't say\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pip\__main__.py", line 29, in <module>
from pip._internal.cli.main import main as _main
File "C:\Users\Can't say\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pip\_internal\__init__.py", line 3, in <module>
import pip._internal.utils.inject_securetransport # noqa
ModuleNotFoundError: No module named 'pip._internal.utils'
Just a general observation: if you’re only going to use one function from a Module, it’s generally better to be specific…
from time import sleep
… rather then importing a whole load of stuff that you don’t need.
You can check want’s in a Module like this:
import time as contents
output = dir(contents)
print(output)
Not so much, with ‘time’, but other Modules will have a tonne of stuff, so it’s better to get into the habit of only importing what you’re going to use.