Skip to content

Commit c5183ca

Browse files
Fix Setup Instructions For Mac (#9103)
* fix: outdated poetry installation script url * add: solution for not found error cairo or pango * add: solution for library fontconfig not found by weasyprint * Add platform specification for celery service
1 parent 4d0895a commit c5183ca

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

Diff for: docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ x-defaults: &defaults
2222
- ./generated:/data/app/generated # Workaround for #6155
2323

2424
services:
25-
2625
postgres:
2726
image: postgis/postgis:12-3.0-alpine
2827
container_name: opev-postgres
@@ -49,6 +48,7 @@ services:
4948
- 8080:8080
5049

5150
celery:
51+
platform: linux/x86_64
5252
<<: *defaults
5353
container_name: opev-celery
5454
depends_on:

Diff for: docs/installation/local.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ In case you use Ubuntu 20.04+, where Python 3.8 is not provided in official repo
6767
- Install [Poetry](https://python-poetry.org/docs) to handle Python dependencies:
6868

6969
```sh
70-
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
70+
curl -sSL https://install.python-poetry.org | python3 -
7171
source ~/.profile
7272
```
7373

@@ -147,7 +147,21 @@ python3 manage.py db stamp head
147147
```
148148
**Note 1:** In case you made your own username and password in Step 2 are now getting `FATAL: password authentication failed for user "john"` , probable cause is non updation of `.env` file. To resolve it, open the `.env` file and update `DATABASE_URL=postgresql://USERNAME:[email protected]:5432/oevent` and you are good to go.
149149

150-
**Note2:** In case you are using Anaconda distribution for python, you may get an import error regarding `celery.signals` module. Please use the default python version while executing these steps in that case.
150+
**Note 2:** In case you are using Anaconda distribution for python, you may get an import error regarding `celery.signals` module. Please use the default python version while executing these steps in that case.
151+
152+
**Note 3:** In the case you get the error "OSError: no library called "cairo-2" was found" or "OSError: cannot load library 'pango-1.0'", run the following commands ([ref](https://stackoverflow.com/a/75663010)):
153+
154+
```sh
155+
brew install cairo
156+
brew install pango
157+
```
158+
159+
**Note 4:** In the case you get the error "OSError: ctypes.util.find_library() did not manage to locate a library called 'fontconfig', run the following commands from inside the Poetry shell ([ref](https://stackoverflow.com/a/46941804)):
160+
161+
```sh
162+
brew install python3 cairo pango gdk-pixbuf libffi
163+
python3 -m pip install --upgrade --force-reinstall weasyprint
164+
```
151165

152166
## Start application
153167

0 commit comments

Comments
 (0)