foca
foca copied to clipboard
Using FOCA without Docker
Problem
When trying to use FOCA without using docker container, the below error is arising.
Steps to recreate
- create a virtualenv using
virtualenv venv
and activate it usingvenv\scripts\activate
. - Install foca package using
pip install foca
. - Create app.py file and add the following code in it.
from foca import Foca
if __name__ == '__main__':
foca = Foca(
config_file="config.yaml"
)
app = foca.create_app()
app.run()
- create a config.yaml file and add the following code in it.
server:
host: '0.0.0.0'
port: 8080
debug: True
environment: development
testing: False
use_reloader: True```
- Run
python app.py
Workaround
- Create a requirements.txt file in the folder where your app.py is present.
- Copy all the packages from this file and paste it into your requirements.txt file (just copy all and paste).
- Run
python install -r requirements.txt
. - Now start again
python app.py
and it will work.