I installed pytz on Debian Buster via
sudo pip install pytz
and the install completed cleanly. However, when I attempt to
import pytz
python throws an exception
import pytz
ModuleNotFoundError: No module named 'pytz'
I installed pytz 2019.3 via pip 18.1. Any thoughts on why pytz is not found?
Update: I ran pip -v
and now see that it is using python2.7. Is there a way to tell pip to use python3? I cannot remove python2 as it is a dependency for a number of packages.
2
Answers
Adding to @emrah-diril answer:
and then use
Use
pip3
to install modules forpython3