Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
MinecraftDiscord/lib/librarySetup.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
39 lines (32 sloc)
801 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def checkLibraries(): | |
import getpass | |
import os | |
'''Check to see if pip3 is installed''' | |
try: | |
os.system("pip3 -V") | |
except: | |
os.system("sudo apt install python3-pip") | |
'''Check discord.py''' | |
try: | |
import discord | |
except: | |
try: | |
os.system("python3 -m pip install -U discord.py") #Linux/Mac OS | |
except: | |
os.system("py3 -m pip install -U discord.py") #Windows | |
'''Check mcstatus''' | |
try: | |
import mcstatus | |
except: | |
os.system("pip3 install mcstatus") | |
'''Check status''' | |
try: | |
import status | |
except: | |
os.system("pip3 install status") | |
'''Check dotenv''' | |
try: | |
import dotenv | |
except: | |
os.system("pip3 install python-dotenv") | |
checkLibraries() |