Upgrade pip package in Docker when an older version is required by one component

Hi,
I am building a custom component to connect my HA instance to a DIY bluetooth low energy device I am developed.
For that, I use bluepy and require the latest version 1.3.0. When I set REQUIREMENTS to bluepy==1.3.0, the component does not get loaded and I get an error about configuration in HA.
When I only set REQUIREMENTS to bluepy without version, the component gets loaded but I end up in runtime errors as I use some functions that are only available in the 1.3.0 release.

I tried to upgrade (temporarily the package from within the docker container with pip install -U bluepy but this is what I get :

# pip3 install --upgrade bluepy
Collecting bluepy
  Using cached https://files.pythonhosted.org/packages/27/91/6cfca10bee9862f93015413cf9e6a52c3081a71f1518963396a055128f8e/bluepy-1.3.0.tar.gz
Building wheels for collected packages: bluepy
  Building wheel for bluepy (setup.py) ... error
  Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-7144a_77/bluepy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-zgqsmxn2 --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  Working dir is /tmp/pip-install-7144a_77/bluepy
  execute make -C ./bluepy clean
  error: [Errno 2] No such file or directory: 'make': 'make'
  
  ----------------------------------------
  Failed building wheel for bluepy
  Running setup.py clean for bluepy
Failed to build bluepy
Installing collected packages: bluepy
  Found existing installation: bluepy 1.1.4
    Uninstalling bluepy-1.1.4:
      Successfully uninstalled bluepy-1.1.4
  Running setup.py install for bluepy ... error
    Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-7144a_77/bluepy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-kao38q8s/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    Working dir is /tmp/pip-install-7144a_77/bluepy
    execute make -C ./bluepy clean
    error: [Errno 2] No such file or directory: 'make': 'make'
    
    ----------------------------------------
  Rolling back uninstall of bluepy
  Moving to /usr/local/bin/blescan
   from /tmp/pip-uninstall-7r4d6a2m/blescan
  Moving to /usr/local/bin/sensortag
   from /tmp/pip-uninstall-7r4d6a2m/sensortag
  Moving to /usr/local/bin/thingy52
   from /tmp/pip-uninstall-7r4d6a2m/thingy52
  Moving to /usr/local/lib/python3.7/site-packages/bluepy-1.1.4-py3.7.egg-info
   from /usr/local/lib/python3.7/site-packages/~luepy-1.1.4-py3.7.egg-info
  Moving to /usr/local/lib/python3.7/site-packages/bluepy/
   from /usr/local/lib/python3.7/site-packages/~luepy
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-7144a_77/bluepy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-kao38q8s/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-7144a_77/bluepy/

When looking at the github repo, I only found bluepy to be a requirements for miflora, mitemp, decora and another climate component, none of which I am using. Is there a way to force the upgrade of the pip package (even manually if necessary) ?

Not sure if you know how build docker packages but you can do that and just include older pip version during build

It looks to me like the module is trying to compile for your system and there is not compiler or build tools.

What OS are you running?

I have never build a docker image but I could have a go.
My assumption though was that the python packages were retrieve by Home-Assistant and are not really part of the docker image (I’m interested only on bluepy that is available through pip)

I’m running Raspbian on a Raspberry Pi 3 B. I use the raspberrypi3 special docker image so I would guess it contains the build tools.

I assume you are running Hassio which has its own HassOs, a minimal operating system.
There is also RPi images for Hassbian, but that does not use Docker.

It is possible to run Hassio on Raspbian or Raspbian Lite with just a little modification to the Hassio Linux install instructions. You could then install build-essential and get the tools you need,

This isn’t necessary.

Sorry if I wasn’t clear. I am not using hass.io. I installed Raspbian myself and just use docker directly with
homeassistant/raspberrypi3-homeassistant. I do not wish to use Hass.io as I might like to run other things on my Pi.

I could just install tools inside the docker container but then I would loose them on the next update and also it might not help HA installing the correct python packages at boot.