# Failed to prepare extension environment

**URL:** <https://community.dynatrace.com/t/failed-to-prepare-extension-environment/47006>\
**Category:** Extensions\
**Tags:** extensions\
**Created:** [August 5, 2024, 2:50pm UTC](https://community.dynatrace.com/t/failed-to-prepare-extension-environment/47006 "2024-08-05T14:50:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_davidemascolo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/_davidemascolo/32/16111_2.png) [@\_davidemascolo](https://community.dynatrace.com/u/_davidemascolo)\
**Post date:** [August 5, 2024, 2:50pm UTC](https://community.dynatrace.com/t/failed-to-prepare-extension-environment/47006/1 "2024-08-05T14:50:17Z")

</div>

SpoilerHi all,  
recently I tried to deploy a custom extension on activegate. Looking at the logs I noticed the following errors.

2024-08-05 14:47:04.469 UTC [003946f3] warning [native] Failed to prepare extension environment:  
id: f\_-5077411103933439232  
datasource: python:3.10  
time elapsed: 3.21s  
command: “/var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/python\_venvs/custom\_keycloak-ext\_0.0.3/bin/python3” -m pip install --no-warn-script-location --no-cache-dir --no-index -f /var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/cache/custom\_keycloak-ext/0.0.3/lib keycloak\_ext  
error: WARNING: Location ‘/var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/cache/custom\_keycloak-ext/0.0.3/lib’ is ignored: it is either a non-existing path or lacks a specific scheme.  
ERROR: Could not find a version that satisfies the requirement keycloak\_ext (from versions: none)  
ERROR: No matching distribution found for keycloak\_ext

2024-08-05 14:47:04.469 UTC [003946f3] warning [native] std ouput from “”/opt/dynatrace/remotepluginmodule/agent/res/dsruntime/python3.10/bin/python3" -m venv /var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/python\_venvs/custom\_keycloak-ext\_0.0.3 --system-site-packages --without-pip" command:

std ouput from “”/var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/python\_venvs/custom\_keycloak-ext\_0.0.3/bin/python3" -m pip install --no-warn-script-location --no-cache-dir --no-index -f /var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/cache/custom\_keycloak-ext/0.0.3/lib keycloak\_ext" command:  
Looking in links: /var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/cache/custom\_keycloak-ext/0.0.3/lib

2024-08-05 14:47:04.469 UTC [003946f3] info [native] Rejected fastcheck for task f\_-5077411103933439232 -  
2024-08-05 14:47:06.777 UTC [003946b5] info [native] Fastcheck f\_-5077411103933439232 for datasource python ended with code -1: N/A

Could you help me to understand what happened?

Regards,  
Davide

---

<div class="post-metadata">

**Author:** ![\_davidemascolo](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/_davidemascolo/32/16111_2.png) [@\_davidemascolo](https://community.dynatrace.com/u/_davidemascolo)\
**Post date:** [August 5, 2024, 3:06pm UTC](https://community.dynatrace.com/t/failed-to-prepare-extension-environment/47006/2 "2024-08-05T15:06:55Z")

</div>

Other details:

- Looking in links: /var/lib/dynatrace/remotepluginmodule/agent/runtime/extensions/cache/custom\_keycloak-ext/0.0.3/lib --\> lib folder doesn’t exist.

---

<div class="post-metadata">

**Author:** ![Tom\_sSeroteRoos](https://avatars.discourse-cdn.com/v4/letter/t/bb73d2/32.png) [@Tom\_sSeroteRoos](https://community.dynatrace.com/u/Tom_sSeroteRoos)\
**Post date:** [August 7, 2024, 5:42am UTC](https://community.dynatrace.com/t/failed-to-prepare-extension-environment/47006/3 "2024-08-07T05:42:51Z")

</div>

Is keycloak\_ext the name of your extension or a python package?

If the former, then something weird happened with your build. Share the contents of the extension.zip file you are using, as well as how you built it.

If the latter, this usually happens when you build the extension in one platform but try to run it in another -- pip might miss downloading wheels for the platform you are trying to run on. Check what OS you are trying to run the extension on and whether the extension.zip file has the wheels required to install all packages for that OS.
