Question: One of the core files **classes/stock/StockAvailable.php** contains:

```
class StockAvailableCore extends ObjectModel
{
   public static function getQuantityAvailableByProduct($id_product = null, $id_product_attribute = null, $id_shop = null)
     {
       ...
     }
  ...
}

```

I want to call this **getQuantityAvailableByProduct()** method from my module.

So I tried to include this class (and it's father class and father's interface), extend it and call method like this:

```
require_once('../../src/Core/Foundation/Database/EntityInterface.php');
require_once('../../classes/ObjectModel.php');
require_once('../../classes/stock/StockAvailable.php');

$MyClass = new StockAvailableCore();

$MyClass->getStockAvailableIdByProductId($id);

```

And the error that I'm getting:

```
PHP Fatal error:  Uncaught Error: Class 'ObjectModel' not found in /home/mantas/Server/honey/classes/stock/StockAvailable.php:34

```

What am i missing? And is this the correct way to extend a class and call method?

Answer: 
I see two choices:

1. Using a Ubuntu image, leave the Python from system untouched. Install pyenv (<https://github.com/pyenv/pyenv>), then download a python 3.7 install, completely separated from system's Python.

or

2. Use the official Python image labeled 3.7.3-stretch or 3.7.3-slim-stretch (Debian)
If your only requirement is of python 3.7 and the version of the underlying os doesn't bothers you then you should go with the option of creating image from official python3.7 image. 
`FROM python:3.7`
And then install the required packages from requirements.txt