Closed jcvo90 closed 6 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
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
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.
You could fetch the latest telepot
version with the command
pip3 install telepot --upgrade
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.
The pip source for Raspberry Pi
s 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:
telepot
directly from source
$ pip3 install --upgrade git+https://github.com/nickoala/telepot
pip
index
$ echo '' > /etc/pip.conf
Overwrite the installed version
$ pip install --upgrade telepot
Add the index again
$ cat << DROP > /etc/pip.conf
[global]
extra-index-url=https://www.piwheels.org/simple
DROP
Thanks a lot, the problem solved
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?