-1

I tried this pip install:

pip install https://github.com/rapptz/discord.py

I get the error 'SyntaxError: Invalid Syntax'.

Can I install from GitHub using pip?

H. Pauwelyn
  • 12,572
  • 26
  • 77
  • 129

2 Answers2

2

This package seems to be only for python 3.x. so just type the following command:

sudo python3 -m pip install git+https://github.com/rapptz/discord.py

The meaning of this command:

  1. python3 -m is to specify the python version.
  2. pip install git+https:[URL] is for git repos.
  3. Note that point 2 can also be:pip install git+git:[URL] or pip install --upgrade https:[URL].
0

pip is a command line utility outside of python.

Run pip install https://github.com/rapptz/discord.py on your terminal, not inside a python REPL.

Jerome Indefenzo
  • 931
  • 6
  • 23
  • where do i find the terminal – Jake Bamford Oct 20 '16 at 17:13
  • what OS are you using? – Jerome Indefenzo Oct 20 '16 at 17:16
  • If you don't have pip yet, [look here](http://www.pip-installer.org/en/latest/installing.html) fo instructions on how to install it. After installing it, [open the command prompt](http://www.howtogeek.com/235101/10-ways-to-open-the-command-prompt-in-windows-10/) and run `pip install https://github.com/rapptz/discord.py`. – Jerome Indefenzo Oct 20 '16 at 17:19
  • Also, check this question out: http://stackoverflow.com/questions/20101834/pip-install-from-github-repo-branch for some more info on cloning git repos with `pip` – Cameron Hurd Oct 20 '16 at 17:20