# Python 2.0 extension: No matching distribution found for my\_python

**URL:** <https://community.dynatrace.com/t/python-2-0-extension-no-matching-distribution-found-for-my-python/44510>\
**Category:** Extensions\
**Tags:** python, extensions\
**Created:** [March 7, 2024, 10:04pm UTC](https://community.dynatrace.com/t/python-2-0-extension-no-matching-distribution-found-for-my-python/44510 "2024-03-07T22:04:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![sivart\_89](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Post date:** [March 7, 2024, 10:04pm UTC](https://community.dynatrace.com/t/python-2-0-extension-no-matching-distribution-found-for-my-python/44510/1 "2024-03-07T22:04:49Z")

</div>

I’m working on trying to get more familiar with creating a python based extension in the 2.0 framework. I am able to test it locally via the simulate button and see it is working fine but when I upload it to an AG I get the below via grail. I have python 3.11.5 installed on the AG. Anyone ran into this before or know some steps I can take to troubleshoot?

I haven’t done anything but touch the \_\_\_main\_\_.py\_ file and added some code there, haven’t touched any other file.

Failed to assign monitoring configuration to ActiveGate. Reason: ERROR: No matching distribution found for my\_python

---

<div class="post-metadata">

**Author:** ![DavidMass](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/davidmass/32/9065_2.png) [@DavidMass](https://community.dynatrace.com/u/DavidMass)\
**Post date:** [March 7, 2024, 10:11pm UTC](https://community.dynatrace.com/t/python-2-0-extension-no-matching-distribution-found-for-my-python/44510/2 "2024-03-07T22:11:55Z")

</div>

Hi&nbsp;[@sivart\_89](https://community.dynatrace.com/user/17361),&nbsp;  
Can you please try building your extension with Python 3.10. The ActiveGates have 3.10&nbsp;included that EF2 Python extensions use.  
(for example in :&nbsp;C:\Program Files\dynatrace\remotepluginmodule\agent\res\dsruntime\python3.10\bin)&nbsp;  
This also means that you don’t have to install Python separately on the AG(s) you want to run the extensions from.

---

<div class="post-metadata">

**Author:** ![sivart\_89](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Post date:** [March 7, 2024, 10:41pm UTC](https://community.dynatrace.com/t/python-2-0-extension-no-matching-distribution-found-for-my-python/44510/3 "2024-03-07T22:41:55Z")

</div>

That did it 🙂 thank you!

I’m now seeing from grail the below. Is there a file within the extension where I should be putting the required modules? I noticed there is file python.egg-info/requires.txt but that does not seem to actually be saved with changes, seems you need to add it into the setup.py to have the requires.txt file updated. Not even sure if that is the right approach though.

Method=query: ModuleNotFoundError(“No module named ‘requests’”)

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [March 7, 2024, 10:43pm UTC](https://community.dynatrace.com/t/python-2-0-extension-no-matching-distribution-found-for-my-python/44510/4 "2024-03-07T22:43:58Z")

</div>

Adding it into the setup file is the way to go.

Download the netscaler or so extension from the public hub to have a look at how we built that extension wheel file.

---

<div class="post-metadata">

**Author:** ![DavidMass](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/davidmass/32/9065_2.png) [@DavidMass](https://community.dynatrace.com/u/DavidMass)\
**Post date:** [March 7, 2024, 11:00pm UTC](https://community.dynatrace.com/t/python-2-0-extension-no-matching-distribution-found-for-my-python/44510/5 "2024-03-07T23:00:02Z")

</div>

As an example to what Mike said, in the setup.py you can add all your required modules in the “install\_requires” array.

```auto
install_requires=["dt-extensions-sdk", "requests"],

```

> **[setup.py - Extension Structure — dt-sdk 1.0.0 documentation](https://dynatrace-extensions.github.io/dt-extensions-python-sdk/guides/extension_structure.html#setup-py)**
>
> The basic bare-bone structure of an extension is as follows:

---

<div class="post-metadata">

**Author:** ![sivart\_89](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Post date:** [March 7, 2024, 11:06pm UTC](https://community.dynatrace.com/t/python-2-0-extension-no-matching-distribution-found-for-my-python/44510/6 "2024-03-07T23:06:35Z")

</div>

Downloaded it, thanks for pointing that out. I’ll likely reference it a bit more as I learn more of this.

---

<div class="post-metadata">

**Author:** ![sivart\_89](https://avatars.discourse-cdn.com/v4/letter/s/848f3c/32.png) [@sivart\_89](https://community.dynatrace.com/u/sivart_89)\
**Post date:** [March 7, 2024, 11:07pm UTC](https://community.dynatrace.com/t/python-2-0-extension-no-matching-distribution-found-for-my-python/44510/7 "2024-03-07T23:07:32Z")

</div>

Thank you&nbsp;[@DavidMass](https://community.dynatrace.com/user/909). I no longer see that error. Getting other errors now but I know how to fix them. Much appreciated!
