How to use Python 3.6.8?

I have AWS Lambda. It run without problem with Python 3.6.8. But when Serverless or AWS Lambda updated to Python 3.6.9 (without any change to my code), it won’t pass anymore. There comes following error: “/usr/bin/python3.6: No module named pip”

What should I do to use exactly Python 3.6.8? I can find only “Python3.6” from serverless.yml etc.

I have already tried to update to Python 3.7, 3.8, and 3.9 but then there comes other problems and I can’t build&deploy it. That is the reason why I first want it to run again with Python 3.6.8, and then try to update to newer version of Python.

Pip is a python packaging module that helps us too install python libraries. To install python libraries/modules ,you need to install pip-

    sudo apt-get install python-setuptools
    sudo easy_install pip
    sudo apt-get update
    which pip //to check pip install or not
    pip install requests

Upgrade pip

python -m pip install --upgrade pip