foca icon indicating copy to clipboard operation
foca copied to clipboard

Using FOCA without Docker

Open paras41617 opened this issue 10 months ago • 4 comments

Problem

When trying to use FOCA without using docker container, the below error is arising. image (1)

Steps to recreate

  1. create a virtualenv using virtualenv venv and activate it using venv\scripts\activate.
  2. Install foca package using pip install foca.
  3. 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()
  1. 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```
  1. Run python app.py

Workaround

  1. Create a requirements.txt file in the folder where your app.py is present.
  2. Copy all the packages from this file and paste it into your requirements.txt file (just copy all and paste).
  3. Run python install -r requirements.txt.
  4. Now start again python app.py and it will work.

paras41617 avatar Apr 01 '24 08:04 paras41617