-1

hello I'm a beginner @ learning python.I'm trying to make a chatbot in Telegram but I'm constanly recieving an error and I don't know how to solve the problem .I've checked python in Command promp And it is installed (python 2.7)

 $ pip install-telegram-bot
 File "<stdin>", line 1
 $ pip install-telegram-bot
 ^
 SyntaxError: invalid syntax
7
  • Where do you try to run your script? Commented Jun 19, 2017 at 5:54
  • Python (command line) Commented Jun 19, 2017 at 5:55
  • You manage python from outside the installation. Commented Jun 19, 2017 at 5:56
  • 1
    You need to execute the command in cmd or terminal and not in your Python shell. Commented Jun 19, 2017 at 5:58
  • do u mean i should run it in python IDE? i did that too but again the same error..! Commented Jun 19, 2017 at 5:59

1 Answer 1

2

You got a typo. Redundant dash.

Run pip install telegram-bot

User Guide how to install packages with pip.

UPDATE: You should not be running pip commands in python prompt. You should run them in terminal. Also you should not copy $ sign.

To sum up: Open Terminal -> run pip install telegram-bot -> open python -> you are good to go.

Sign up to request clarification or add additional context in comments.

4 Comments

i just did that but again i recieved the same error
are you on mac or windows?
@apadana for whom the question is asked?
Sorry it was meant for @Kiana

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.