ImportError: cannot import name 'DEPRECATED_SERVICE_NAMES' from 'botocore.docs'

Thank you all for the answers!
Actually, I don’t have the possibility to move to a newer Python version, I need somehow to make it work on Python 3.7. The dependencies exhibited are not in a requirements file, but instead are part of the python script, which pip install them by doing:

for package in dependencies:
    if hasattr(pip, 'main'):
        pip.main(['install', package])
    else:
        pip._internal.main(['install', package])

Now, I have noticed that I get the error when I go to import boto3:

ImportError: cannot import name ‘DEPRECATED_SERVICE_NAMES’ from ‘botocore.docs’

when in the dependencies installation logs I have:

Requirement already satisfied: six>=1.5 in ./myenv/lib/python3.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore<1.27.60,>=1.27.59->aiobotocore~=2.4.2->s3fs) (1.16.0)
Requirement already satisfied: zipp>=0.5 in ./myenv/lib/python3.7/site-packages (from importlib-metadata->attrs>=17.3.0->aiohttp!=4.0.0a0,!=4.0.0a1->s3fs) (3.15.0)
WARNING: Ignoring invalid distribution -otocore (/mnt/c/Users/myuser/Desktop/dqse/myenv/lib/python3.7/site-packages)
Installing collected packages: botocore
  Attempting uninstall: botocore
    WARNING: Ignoring invalid distribution -otocore (/mnt/c/Users/myuser/Desktop/dqse/myenv/lib/python3.7/site-packages)
    Found existing installation: botocore 1.33.13
    Uninstalling botocore-1.33.13:
      Successfully uninstalled botocore-1.33.13
WARNING: Ignoring invalid distribution -otocore (/mnt/c/Users/myuser/Desktop/dqse/myenv/lib/python3.7/site-packages)
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
s3transfer 0.8.2 requires botocore<2.0a.0,>=1.33.2, but you have botocore 1.27.59 which is incompatible.
boto3 1.33.13 requires botocore<1.34.0,>=1.33.13, but you have botocore 1.27.59 which is incompatible.
Successfully installed botocore-1.27.59

Instead, everything seems to work fine when in the logs i have:

Collecting botocore==1.33.13
  Using cached botocore-1.33.13-py3-none-any.whl (11.8 MB)
Requirement already satisfied: jmespath<2.0.0,>=0.7.1 in ./myenv/lib/python3.7/site-packages (from botocore==1.33.13) (1.0.1)
Requirement already satisfied: urllib3<1.27,>=1.25.4 in ./myenv/lib/python3.7/site-packages (from botocore==1.33.13) (1.26.15)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in ./myenv/lib/python3.7/site-packages (from botocore==1.33.13) (2.8.2)
Requirement already satisfied: six>=1.5 in ./myenv/lib/python3.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore==1.33.13) (1.16.0)
WARNING: Ignoring invalid distribution -otocore (/mnt/c/Users/myuser/Desktop/dqse/myenv/lib/python3.7/site-packages)
Installing collected packages: botocore
  Attempting uninstall: botocore
    WARNING: Ignoring invalid distribution -otocore (/mnt/c/Users/myuser/Desktop/dqse/myenv/lib/python3.7/site-packages)
    WARNING: No metadata found in ./myenv/lib/python3.7/site-packages
    Found existing installation: botocore 1.27.59
    Can't uninstall 'botocore'. No files were found to uninstall.
WARNING: Ignoring invalid distribution -otocore (/mnt/c/Users/myuser/Desktop/dqse/myenv/lib/python3.7/site-packages)
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
aiobotocore 2.4.2 requires botocore<1.27.60,>=1.27.59, but you have botocore 1.33.13 which is incompatible.
Successfully installed botocore-1.33.13

So if I manage to avoid installing botocore-1.27.59 and I keep botocore-1.33.13, I guess everything would work fine. But what else can I do more than specifying “boto3==1.33.13”, “botocore==1.33.13”,in the dependencies?