|
@ -8,45 +8,49 @@ These instructions will get you a copy of the project up and running on your loc |
|
|
|
|
|
|
|
|
### Prerequisites |
|
|
### Prerequisites |
|
|
|
|
|
|
|
|
Before starting the setup, make sure Python 3 and PostgreSQL is installed on your system. |
|
|
|
|
|
|
|
|
- Python 3 |
|
|
|
|
|
- `pip` |
|
|
|
|
|
- PostgreSQL |
|
|
|
|
|
|
|
|
|
|
|
#### On Debian/Ubunu |
|
|
|
|
|
``` shell |
|
|
|
|
|
sudo apt-get install python3-pip |
|
|
|
|
|
sudo apt-get install postgresql |
|
|
|
|
|
sudo apt-get install python-psycopg2 |
|
|
|
|
|
sudo apt-get install libpq-dev |
|
|
|
|
|
pip install --user virtualenv |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
<!--- installation steps {{{ --> |
|
|
<!--- installation steps {{{ --> |
|
|
|
|
|
|
|
|
### Installing |
|
|
### Installing |
|
|
|
|
|
|
|
|
1. Use the pip tool to install `virtualenv`. See this [guide](http://docs.python-guide.org/en/latest/dev/virtualenvs/) for further details. |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
pip install --user pipenv |
|
|
|
|
|
|
|
|
1. Create a virtual environment. |
|
|
|
|
|
``` shell |
|
|
|
|
|
virtualenv /path/to/new/virtual/environment |
|
|
``` |
|
|
``` |
|
|
2. Create a virtual environment. |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
python3 -m venv /path/to/new/virtual/environment |
|
|
|
|
|
``` |
|
|
|
|
|
3. `cd` into the directory you just created a virtual environment in, |
|
|
|
|
|
|
|
|
1. `cd` into the directory you just created a virtual environment in, |
|
|
and clone the GitHub repo: |
|
|
and clone the GitHub repo: |
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
``` shell |
|
|
cd /path/to/new/virtual/environment |
|
|
cd /path/to/new/virtual/environment |
|
|
git clone https://github.com/Kevin-Mok/spotify-lib-vis |
|
|
git clone https://github.com/Kevin-Mok/spotify-lib-vis |
|
|
``` |
|
|
``` |
|
|
4. Activate the virtual environment from the command line. |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
1. Activate the virtual environment from the command line. |
|
|
|
|
|
``` shell |
|
|
# activate.fish if you're using fish shell |
|
|
# activate.fish if you're using fish shell |
|
|
source bin/activate |
|
|
source bin/activate |
|
|
``` |
|
|
``` |
|
|
5. `cd` into the repository root directory and install all |
|
|
|
|
|
dependencies using `pip`. |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
1. `cd` into the repository root directory and install all dependencies using `pip`. |
|
|
|
|
|
``` shell |
|
|
cd spotify-lib-vis |
|
|
cd spotify-lib-vis |
|
|
pip install -r requirements.txt |
|
|
|
|
|
|
|
|
pip3 install -r requirements.txt |
|
|
``` |
|
|
``` |
|
|
6. Run `reset_db.sh` to create the database and start the server. |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
1. Run `reset_db.sh` to create the database and start the server. |
|
|
|
|
|
``` shell |
|
|
./scripts/reset_db.sh |
|
|
./scripts/reset_db.sh |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|