Skip to content
← Back to Community
How to make Repl.it stop installing the wrong package
Profile icon
aimstest

Hello All,
I have been trying to make a Telegram Bot using the pyTelegramBotAPI. (https://pypi.org/project/pyTelegramBotAPI/)

It requires use of :
import telebot

However, whenever I run the script, Repl.it starts downloading another package called telebot (https://pypi.org/project/telebot/).

How do I force Repl.it to use the wrapper package I want to use, instead of what poetry is causing to install?
Even when I do a pip install pyTelegramBotAPI from the shell, it gets overwritten by the wrong telebot. :\

Is there some way to disable poetry, or this behavior?
I have tried changing the pyproject.toml file, but I'm not too sure what to change there.

Can someone help me please?
Thanks!

Voters
Profile icon
JAMES9039931
Profile icon
malpkakefirek
Profile icon
Alirezaaraby
Profile icon
klezm
Profile icon
Saibot84
Profile icon
ampersandbar
Profile icon
gerile3
Profile icon
JoseMancharo
Profile icon
aimstest
Comments
hotnewtop
Profile icon
moh0009

steps:
1.open packages tap
2.type pyTelegramBotAPI

  1. install the first package
    4 . click run button
    enjoy
Profile icon
thechawla225

@moh0009 Thanks , this worked for me.

Profile icon
Saibot84

I'm having a similar issue with the repl installing dummy-wx when I am trying to use wxPython ... because both packages use the same wx name.

I'm trying to use a .replit file to override it ... but I feel there has to be a better way.

EDIT
Researching my own question, upm guess is guessing that I might need the dummy-wx package. There is a .upm/store.json file that lists the guessed packages. Manually changing .upm/store.json, then doing poetry remove dummy-wx, and installing the local wxpython wheel temporarily fixes the issue.

Profile icon
Saibot84

@aimstest, it looks like pyproject.toml lists telebot as a dependency instead of pyTelegramBotAPI.
In bash, I think you need to run the following 2 lines of code to switch the dependency:

poetry remove telebot poetry add pyTelegramBotAPI

Though I can't test it properly.

Profile icon
aimstest

@Saibot84, thanks for the response. It has been 5 months since I had this issue, and I subsequently ended up using another bot framework altogether.

Profile icon
aimstest

Note to self:
Used:
import subprocess
def install (name):
subprocess.call(['pip', 'install', name])

install('pyTelegramBotAPI')

This will over-write the default installation.

Profile icon
aimstest

Can someone please help me!!!??

Profile icon
phamn23

this is an old thread but an alternative is to open up the shell to directly run the files because UPM won't run automatically (ie: >>> python main.py)