Problems import sysidentpy package

Patrick Schneider 86 Reputation points


for a system identification I need the python package sysidentpy.

However, the integration of the package into my Azure Function App does not want to succeed.

Following is my requirements.txt file:

The following error is issued:
0:03:13 func-PI-RnD-DEWestMid-001: [08:03:13+0000] Collecting sysidentpy==
10:03:13 func-PI-RnD-DEWestMid-001: [08:03:13+0000] Using cached sysidentpy- (21.5 MB)
10:03:14 func-PI-RnD-DEWestMid-001: ERROR: Command errored out with exit status 1:
10:03:14 func-PI-RnD-DEWestMid-001: command: /tmp/oryx/platforms/python/3.9.0/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6gu_bg92/sysidentpy/'"'"'; file='"'"'/tmp/pip-install-6gu_bg92/sysidentpy/'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);'"'"'\r
10:03:14 func-PI-RnD-DEWestMid-001: '"'"', '"'"'
10:03:14 func-PI-RnD-DEWestMid-001: '"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-_3sq2mjs
10:03:14 func-PI-RnD-DEWestMid-001: cwd: /tmp/pip-install-6gu_bg92/sysidentpy/
10:03:14 func-PI-RnD-DEWestMid-001: Complete output (1 lines):
10:03:14 func-PI-RnD-DEWestMid-001: numpy is required during installation
10:03:14 func-PI-RnD-DEWestMid-001: ----------------------------------------
10:03:14 func-PI-RnD-DEWestMid-001: ERROR: Command errored out with exit status 1: python egg_info Check the logs for full command output.

The following article notes that this may be related to the Python version used. According to the article, I need Python version 3.8 and numpy version 1.19.3.

I have also tried it with the mentioned numpy version but it did not work either.

My Function App is implemented in Linux. I had set the python version to 3.8 or 3.9 (I am not sure).

Is there a way to check the specific Version (Not whether it is only 3.x but whether it is really 3.8 or 3.9)
And is there a way to set the existing function app to 3.8?

Are there any other comments which could solve the problem.

I hope someone can help me further.

With best regards

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,393 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. MayankBargali-MSFT 69,581 Reputation points

    @Patrick Schneider In scenario where the modules can be installed using pip then you can mentioned the same in your requirements.txt and those modules will get installed.

    But in cases if those module or dependencies cannot be installed using pip then you need to use build native dependencies or enable remote build.
    You can refer to python troubleshooting document for more details.

    If it works locally then you can try with build native dependencies or enable remote build.

    2 people found this answer helpful.

  2. Pierre-Luc Giguere 1,076 Reputation points

    Hi Patrick,

    You can check the exact version by adapting the following command :

    az functionapp config show --name thisisaname --resource-group rg-testfunction --query linuxFxVersion --output tsv  

    You have to replace the --name and --resource-group for the name of the functionapp and its resource-group respectively.

    The Python version is set when the function app is created and can't be changed.


    1 person found this answer helpful.
    0 comments No comments

  3. Patrick Schneider 86 Reputation points

    Hello PierreLucGiguere-5297,

    Thank you very much, that has already helped a lot.

    The current App had the python version 3.9. I pulled up the Function App again and deposited the corresponding python version 3.8.

    However, the problem remains the same, the package sysidentpy still can not be installed. (Same error message)

    Can you help me further why the installation fails?