I am deploying flask api with docker but I am getting this error

Anonymous
2023-10-12T03:24:37.5166667+00:00
91 ✘ Locking Failed!
2023-10-12T02:34:28.2914431Z ##[error]#8 21.91 False
2023-10-12T02:34:28.2915459Z ##[error]#8 21.91 CRITICAL:pipenv.patched.pip._internal.resolution.resolvelib.factory:Cannot install -r /tmp/pipenv-rz_x4zex-requirements/pipenv-ohlwo4b8-constraints.txt (line 2) and -r /tmp/pipenv-rz_x4zex-requirements/pipenv-ohlwo4b8-constraints.txt (line 4) because these package versions have conflicting dependencies.
2023-10-12T02:34:28.2916407Z ##[error]#8 21.91 [ResolutionFailure]:   File "/usr/local/lib/python3.8/site-packages/pipenv/resolver.py", line 645, in _main
2023-10-12T02:34:28.2917048Z ##[error]#8 21.91 [ResolutionFailure]:       resolve_packages(
2023-10-12T02:34:28.2917770Z ##[error]#8 21.91 [ResolutionFailure]:   File "/usr/local/lib/python3.8/site-packages/pipenv/resolver.py", line 612, in resolve_packages
2023-10-12T02:34:28.2918446Z ##[error]#8 21.91 [ResolutionFailure]:       results, resolver = resolve(
2023-10-12T02:34:28.2919159Z ##[error]#8 21.91 [ResolutionFailure]:   File "/usr/local/lib/python3.8/site-packages/pipenv/resolver.py", line 592, in resolve
2023-10-12T02:34:28.2919807Z ##[error]#8 21.91 [ResolutionFailure]:       return resolve_deps(
2023-10-12T02:34:28.2920532Z ##[error]#8 21.91 [ResolutionFailure]:   File "/usr/local/lib/python3.8/site-packages/pipenv/utils/resolver.py", line 892, in resolve_deps
2023-10-12T02:34:28.2921614Z ##[error]#8 21.91 [ResolutionFailure]:       results, hashes, internal_resolver = actually_resolve_deps(
2023-10-12T02:34:28.2922401Z ##[error]#8 21.91 [ResolutionFailure]:   File "/usr/local/lib/python3.8/site-packages/pipenv/utils/resolver.py", line 665, in actually_resolve_deps
2023-10-12T02:34:28.2923075Z ##[error]#8 21.91 [ResolutionFailure]:       resolver.resolve()
2023-10-12T02:34:28.2923782Z ##[error]#8 21.91 [ResolutionFailure]:   File "/usr/local/lib/python3.8/site-packages/pipenv/utils/resolver.py", line 442, in resolve
2023-10-12T02:34:28.2924747Z ##[error]#8 21.91 [ResolutionFailure]:       raise ResolutionFailure(message=str(e))
2023-10-12T02:34:28.2925615Z ##[error]#8 21.91 [pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
2023-10-12T02:34:28.2926645Z ##[error]#8 21.91   You can use $ pipenv run pip install 
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,937 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2023-10-13T21:00:55.2233333+00:00

    Thanks for the follow-up and update.

    When using pipeline based approaches, it is generally assuming that any package installations will be done on the pipeline itself. (see)

    Therefore,

    • pip install (or your package manager equivalent) is ran in the Azure DevOps pipeline
    • If using multi-stage workflows (build, deploy stages), make sure that the artifact being uploaded between stages (to the deploy stage) actually contains the the source code required by your application

    -Ensure the Docker Image and tag exists in the Repository that is being targeted. Please check the validity of the credentials.

    -Just to isolate, you may try building and running the Docker image locally to see if the issue persists. If the issue persists, it could be due to a configuration issue in your Dockerfile or dependency conflicts in your code.

    • Python on App Service Linux and why to avoid installing packages on startup.
      See this discussion thread, Python on App Service Linux and why to avoid installing packages on startup. Thanks for inform, to include pipfile/pipfile.lock support at this time.

    Just to highlight, when using Azure Pipelines (or ZipDeploy), Oryx is not enabled by default since you are using an External builder. If you prefer to enable App Service Build Service (Oryx) then you need to add a new App Setting SCM_DO_BUILD_DURING_DEPLOYMENT= true and redeploy.

    Kindly let us know, I'll follow-up with you further.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.