Skip to content
← Back to Community
How to install Python Packages from GitHub
Profile icon
Anonymous19

Hi, I'm currently working on a discord bot project which requires the most updated python package of discord.py which is not currently available on PyPi but is available in the GitHub repository. I've tried installing this package through pip with the syntax:
pip install -U git+https://github.com/Rapptz/discord.py
but I get a generic Syntax Error.
I have also tried following this post: Using Pip On Replit
with no luck. I currently can't seem to find any other documentation on the matter so I would be extremely grateful for any help. (sorry if i've formatted this post wrong or missed anything its my first one :()
Thank you in advance,
Arav

Answered by ch1ck3n [earned 5 cycles]
View Answer
Voters
Profile icon
Anonymous19
Comments
hotnewtop
Profile icon
ch1ck3n

did you make sure you ran pip install -U git+https://github.com/Rapptz/discord.py in the shell, not the console

image

Profile icon
Anonymous19

thank you so much i'm so dumb @ch1ck3n

Profile icon
WillingDude

wouldnt you have to do this everytime you start the repl?

Profile icon
ch1ck3n
Profile icon
emilymarquessal

@ch1ck3n
How? I am having to do this command all the time and was looking for a solution

Profile icon
ch1ck3n

@emilymarquessal i sure love getting pinged 6 months after

I don't think there is another way of doing it, unless the package is on the pypi store then you can just search for the extension on the sidebar thing
image

Profile icon
emilymarquessal

@ch1ck3n
Thanks for answering
Ok, but in this case you said it is not necessary to do it everytime. I am having to do the command -every time-
Fortunetely, I found out that by running the main.py file by command as well lets me use it. So I just do "python main.py". But that means I can't click on the big green button to run the program, which is just too intuitive so I do it all the time. Also, sadly, I can't put my program to run in the mobile version of replit
-although, as it currently is, nothing can really be done in the mobile version. Am I the only one that can't use the mobile version by the way? It constantly messes with my files, changes the order of words, breaks all sort of stuff.. I pretty much given up on using it at this point

Profile icon
emilymarquessal
Profile icon
EvolentStudios

@emilymarquessal

You can do:

import os

os.system('pip install discord')

os.system('clear')