nickoala / telepot

Python framework for Telegram Bot API
MIT License
2.42k stars 474 forks source link

error telepot.aio #333

Closed jcvo90 closed 6 years ago

jcvo90 commented 7 years ago

Hello friends, I'm trying to run an example of the async version in python3.6, however when I try to run it I have the following error:

             ModuleNotFoundError: No module named 'telepot.aio'

i installed following the instructions of the site

              http://telepot.readthedocs.io/en/latest/#async-version-python-3-5

What could it be?

nickoala commented 7 years ago

You probably have not installed telepot on Python 3. When you run pip, pay attention to whether it installs for Python 2.7 or Python 3. On some (most?) systems, you should do this:

pip3 install telepot
jcvo90 commented 7 years ago

Thanks for your answer, I executed your command line and gave the following output:

Requirement already satisfied: telepot in /usr/local/lib/python3.6/site-packages Requirement already satisfied: urllib3> = 1.9.1 in /usr/local/lib/python3.6/site-packages (from telepot)

however, I continue with the same error when trying to run the example

nickoala commented 7 years ago

Then, I suggest you go in the directory /usr/local/lib/python3.6/site-packages, and see if the package telepot.aio is there (probably not). If it is not, then I suggest you remove telepot, then install it again, and see if that makes any difference.

das7pad commented 7 years ago

You could fetch the latest telepot version with the command

pip3 install telepot --upgrade
AlexTank1664 commented 6 years ago

Hello! I have the same problem. I already tried install, upgrade and reinstall telepot, but there is no effect. There is no telepot.aio file on my device.

das7pad commented 6 years ago

The pip source for Raspberry Pis does not compile all packages with their latest supported python version 3.5. They use python 3.4 for telepot for example.

The telepot.aio modules use async def which was added in python3.5. The telepot setup does not copy the telepot.aio package during the installation for anything below 3.5. As pip is pulling a telepot package that was build for python<3.5, the telepot/aio folder is not included.

Long story short: To install telepot with aio support there are two options:

AlexTank1664 commented 6 years ago

Thanks a lot, the problem solved