Hello all!
I have a piece of code running on Google Colab which requires the pptk package. I’ve originally created it back in April, using:
!pip install pptk
import pptk
to import the package, which has always worked fine. Up until four days ago (1st of December), there were never any issues. One day later, however, I tried to run this exact part of the code again, unmodified, and it gave me the following error:
ERROR: Could not find a version that satisfies the requirement pptk (from versions: none)
ERROR: No matching distribution found for pptk
I have looked the error up online, and found that a ‘no matching distribution’ error commonly has to do with a mismatch in versions. For reference, Google Colab appears to be using Python 3.8.15. I have tried changing the Python version using:
# Ensure that Python version 3.6 is installed and used to ensure matching distributions for the pptk package later.
!sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
!sudo update-alternatives --config python3
!sudo apt install python3-pip
# Reinstall pip.
!curl https://bootstrap.pypa.io/pip/3.6/get-pip.py -o get-pip.py
!python3 get-pip.py --force-reinstall
# Check the current version.
!python3 --version
to obtain python3.6 (commonly recommended) or other Python version numbers. This does change Colab’s Python version, and now it does appear to find disributions for and install the pptk package – but trying to import it in the next line still yields:
ModuleNotFoundError: No module named 'pptk'
I have other reasons to suspect the Python version is not the problem. Colab does not appear to automatically update to the newest Python version, as if this were the case, it should have been using Python 3.11. And if it doesn’t automatically update, that would imply that Colab has been running on Python 3.8 all this time, and using this version has – until recently – never posed a problem.
I also looked at whether either pptk or Python have had any version updates between the 1st and 2nd of December, but this does not appear to be the case. Does anyone know what might be going wrong with the pptk install, or what I can do to fix it?