I
I
Ivan Grebnev2021-10-21 15:53:03
Python
Ivan Grebnev, 2021-10-21 15:53:03

How to fix an error in running the telegram bot code in Python?

I'm having a problem running python bot code. The fact is that about six months ago I created several bots in telegrams by downloading the pyTelegramBotAPI library and then somehow did not create them.
Now I decided to make one bot. I try to run the old one, prescribe the path, run the python name.py command and cmd gives the following text: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases. . I tried to find a solution to the problem, I found out that I need to turn off python from the application execution aliases, then in response to the launch I get that "python" is not an internal or external command, executable program or batch file.

I also checked the pyTelegramBotAPI library for installation, when I write pip install pyTelegramBotAPI, cmd gives me the following text with some errors:

<i>WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pytelegrambotapi/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pytelegrambotapi/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pytelegrambotapi/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pytelegrambotapi/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pytelegrambotapi/
Could not fetch URL https://pypi.org/simple/pytelegrambotapi/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pytelegrambotapi/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement pyTelegramBotAPI
ERROR: No matching distribution found for pyTelegramBotAPI
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping</i>

I do not know what to do and how to be, help, please.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Python Newbie, 2021-10-21
@Levman5

These articles will help you: https://coderoad.ru/3515673/%D0%9A%D0%B0%D0%BA-%D0... , https://tutorial.djangogirls.org/en/python_install...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question