A
A
Arthaus252018-06-30 17:52:25
Python
Arthaus25, 2018-06-30 17:52:25

How to fix telebot import issue on os x?

Installed python 3, pip.
Installed TelegrambotAPI from sources (after downloading xCode):

git clone https://github.com/eternnoir/pyTelegramBotAPI.git
cd pyTelegramBotAPI/
python setup.py install

As a result, I get this error:
>>> import telebot
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/telebot/__init__.py", line 1353
    @util.async()
              ^
SyntaxError: invalid syntax

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Tim, 2018-07-04
@darqsat

maybe everything is simpler and python points to 2.7? write python3 setup.py install
Well, check which binary is called by the python command via python --version
On poppy 2.7, python comes out of the box.
5b3d0b76749ed379009469.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question