forked from PennyDreadfulMTG/Penny-Dreadful-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SETUP
58 lines (41 loc) · 2.91 KB
/
SETUP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
- Install MariaDB 10.0+ (alternative MySQL 8.0+)
- Install python3.6+
- Install pip3
- pip3 install -r requirements.txt # If your default python is python2 try `python3 -m pip install -r requirements.txt` instead.
- Note that the Makefile needs python3 and pylint to be in your PATH to function correctly. You may need to do something to make that true.
- Add a bot at https://discordapp.com/developers/applications/me
- Add a bot user for the bot
- Add the bot to your server with https://discordapp.com/oauth2/authorize?client_id=<your client id here>&scope=bot
- Click to reveal the token (not secret) on https://discordapp.com/developers/applications/me
- Copy config.json.example to config.json and alter the value for "token" to this value
- Optionally take a look at configuration.py and enter any required non-default information into config.json.
- Using the values from your config.json issue the following commands in MySQL (you don't need to create the databases):
-- CREATE USER '<mysql_user>'@'<mysql_host>' IDENTIFIED BY '<mysql_password>';
-- GRANT ALL ON <decksite_database>.* TO '<mysql_user>'@'<mysql_host>';
-- GRANT ALL ON <prices_database>.* TO '<mysql_user>'@'<mysql_host>';
-- GRANT ALL ON <magic_database>.* TO '<mysql_user>'@'<mysql_host>';
-- GRANT ALL ON <logsite_database>.* TO '<mysql_user>'@'<mysql_host>';
- Some very minor parts of the bot (the "modofail" command) use libopus and ffmpeg which are not in pip and must be installed in a your-OS-specific way separately. Very optional.
--------
Notes on installing Python 3.6 in Linux Mint
These are the steps I needed to make to install Python 3.6 in a Linux Mint 17.1, where python 2.7 was the default:
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt update
sudo apt install python3.6
curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python3.6 && sudo python3.6 -m easy_install pip
Note: this overwrites your existing pip and pip3 executables with the one from 3.6.
sudo apt install python3.6-dev
The python3.6-dev I'm not sure it's actually required.
sudo apt-get install libfreetype6-dev
sudo apt-get install libatlas-dev
sudo apt-get install libatlas-base-dev gfortran
pip3 install -r requirements
The requests requirement might be an older version than the one needed (2.18.4), so if you need to upgrade:
sudo pip3 install -U requests
I also had some problems with matplotlib and it's dynamic library link to numpy. It might have been cause I installed numpy or scipy by hand at some point, but if you get this kind of problem:
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
you can uninstall (or in my case just plain remove) matplotlib and reinstall it again with:
sudo pip3 install matplotlib
If you have problems with pylint (module lazy_object_proxy or wrapt not found), try installing those dependencies by hand:
sudo pip3 install lazy_object_proxy
sudo pip3 install wrapt