64 lines
1.4 KiB
Markdown
64 lines
1.4 KiB
Markdown
# Installation on Ubuntu 14.04
|
|
## Prepare the system
|
|
1. Install system-wide pip
|
|
**Currently the ensurepip is broken in Python 3.4 / Ubuntu 14.04, therefore we need to install system-wide pip**
|
|
```bash
|
|
sudo apt-get install python3-pip
|
|
```
|
|
|
|
2. Install postgresql
|
|
```bash
|
|
sudo apt-get install postgresql postgresql-client pgadmin3
|
|
```
|
|
[Full Guide](https://help.ubuntu.com/community/PostgreSQL)
|
|
|
|
3. Configure the server and set password
|
|
```bash
|
|
sudo -u postgres psql postgres
|
|
\password postgres
|
|
```
|
|
|
|
4. Install components to build psycopg2
|
|
```bash
|
|
sudo apt-get install libpq-dev python3-dev
|
|
```
|
|
|
|
## Setup the virutal environment
|
|
1. Create the virtual environment
|
|
**Currently the ensurepip is broken in Python 3.4 / Ubuntu 14.04, therefore --without-pip is needed.**
|
|
```bash
|
|
pyvenv-3.4 env --without-pip --system-site-packages
|
|
```
|
|
|
|
2. Activate the virtual environment
|
|
```bash
|
|
source env/bin/activate
|
|
```
|
|
|
|
3. Install pyramid, sqlachemy, psycopg2 and other dependencies:
|
|
```bash
|
|
python3 -m pip install pyramid waitress sqlalchemy zope.sqlalchemy psycopg2
|
|
```
|
|
|
|
|
|
## Prettier - to format typescript files
|
|
```npx prettier --write src/app/```
|
|
|
|
## Eslint - to lint typescript files
|
|
```shell script
|
|
eslint src/app/
|
|
```
|
|
Optional to fix the errors as well
|
|
```
|
|
eslint src/app/ --fix
|
|
```
|
|
|
|
### Poerty remove environment
|
|
```sh
|
|
rm -rf `poetry env info -p`
|
|
```
|
|
|
|
### Poerty install
|
|
```sh
|
|
poetry install
|
|
``` |