Deutsch   English   Français   Italiano  
<u951si$cq9$1@shakotay.alphanet.ch>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!weretis.net!feeder8.news.weretis.net!news.imp.ch!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail
From: Thierry Pinelli <festiventu+news@gmail.com>
Newsgroups: fr.comp.lang.python
Subject: Re: erreur de syntaxe sur python
Date: Tue, 18 Jul 2023 05:45:21 +0200
Organization: =?UTF-8?Q?Usenet=2c_Canal_hist=c3=a9rique?=
Message-ID: <u951si$cq9$1@shakotay.alphanet.ch>
References: <cb581dda-04e3-4312-a968-02d271d46517n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 18 Jul 2023 03:45:22 -0000 (UTC)
Injection-Info: shakotay.alphanet.ch; posting-account="pinuche";
	logging-data="13129"; mail-complaints-to="usenet@alphanet.ch"; posting-host="c2a7e3cbd0459e4595d6733ce751ea25.nnrp.alphanet.ch"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
 Thunderbird/102.13.0
Cancel-Lock: sha256:Dtm7sm3GsJMYX97fcV4MJzTFAJKbg0GxQD+m83qopSI=
In-Reply-To: <cb581dda-04e3-4312-a968-02d271d46517n@googlegroups.com>
Content-Language: fr
Bytes: 5480
Lines: 90

Le 17/07/2023 Bastien Chatainier <bastienchatainier@gmail.com> écrivait  :

> salut je démarre en python et je voit que la commande pip install python-telegram-bot
> que j'ai vue sur un forum ne marche pas car la syntaxe du mot install ne correspond pas est-ce que vous pourriez m'aider ?
> ps:( j'essaye actuellement de coder un petit bot telegram grace a chat gpt )
> 
> merci de votre aide

Bonjour,

C'est pourtant la bonne syntaxe

Chez moi (python 3.9.17) :

pinuche@toshinux:/tmp$ sudo pip install python-telegram-bot 
                              Collecting python-telegram-bot 
 
Downloading python_telegram_bot-20.4-py3-none-any.whl (549 kB) 
                                 549.0/549.0 kB 1.0 MB/s eta 0:00:00 
                 Collecting httpx~=0.24.1 (from python-telegram-bot) 
                                                 Downloading 
httpx-0.24.1-py3-none-any.whl (75 kB) 
                     75.4/75.4 kB 482.6 kB/s eta 0:00:00 
     Requirement already satisfied: certifi in 
/usr/lib/python3.9/site-packages (from 
httpx~=0.24.1->python-telegram-bot) (2023.5.7) 
                                                   Collecting 
httpcore<0.18.0,>=0.15.0 (from httpx~=0.24.1->python-telegram-bot) 
                     Downloading httpcore-0.17.3-py3-none-any.whl (74 
kB)                                                     74.5/74.5 kB 
392.0 kB/s eta 0:00:00                     Requirement already 
satisfied: idna in /usr/lib/python3.9/site-packages (from 
httpx~=0.24.1->python-telegram-bot) (2.10) 
                                                      Requirement 
already satisfied: sniffio in /usr/lib/python3.9/site-packages (from 
httpx~=0.24.1->python-telegram-bot) (1.3.0) 
                                                   Collecting 
h11<0.15,>=0.13 (from 
httpcore<0.18.0,>=0.15.0->httpx~=0.24.1->python-telegram-bot) 
Using cached h11-0.14.0-py3-none-any.whl (58 kB) 
                            Requirement already satisfied: 
anyio<5.0,>=3.0 in /usr/lib/python3.9/site-packages (from 
httpcore<0.18.0,>=0.15.0->httpx~=0.24.1->python-telegram-bot) (3.6.2) 
                                           Installing collected 
packages: h11, httpcore, httpx, python-telegram-bot 
           Attempting uninstall: h11 
                                           Found existing installation: 
h11 0.9.0 
Uninstalling h11-0.9.0: 
                                Successfully uninstalled h11-0.9.0 
                                                          Attempting 
uninstall: httpcore 
                     Found existing installation: httpcore 0.9.1 
                                                   Uninstalling 
httpcore-0.9.1: 
                   Successfully uninstalled httpcore-0.9.1 
                                             Attempting uninstall: httpx 
 
     Found existing installation: httpx 0.13.3 
                                   Uninstalling httpx-0.13.3: 
 
Successfully uninstalled httpx-0.13.3 
                        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. 
                    googletrans 4.0.0rc1 requires httpx==0.13.3, but you 
have httpx 0.24.1 which is incompatible.         telepathy 2.3.2 
requires beautifulsoup4==4.11.1, but you have beautifulsoup4 4.12.2 
which is incompatible. 
                                                telepathy 2.3.2 requires 
click~=7.1.2, but you have click 8.1.3 which is incompatible. 
     telepathy 2.3.2 requires requests~=2.28.1, but you have requests 
2.31.0 which is incompatible.        telepathy 2.3.2 requires 
telethon==1.25.2, but you have telethon 1.28.5 which is incompatible. 
     Successfully installed h11-0.14.0 httpcore-0.17.3 httpx-0.24.1 
python-telegram-bot-20.4               WARNING: Running pip as the 
'root' user can result in broken permissions and conflicting behaviour 
with the system package manager. It is recommended to use a virtual 
environment instead: https://pip.pypa.io/warnings/venv 

==========================================================

pinuche@toshinux:/tmp$ pip list | grep bot
python-telegram-bot           20.4
telebot                       0.0.5