cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Python 2.0 extension: No matching distribution found for my_python

sivart_89
Advisor

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

6 REPLIES 6

DavidMass
Dynatrace Mentor
Dynatrace Mentor

Hi @sivart_89
Can you please try building your extension with Python 3.10. The ActiveGates have 3.10 included that EF2 Python extensions use.
(for example in : C:\Program Files\dynatrace\remotepluginmodule\agent\res\dsruntime\python3.10\bin) 
This also means that you don't have to install Python separately on the AG(s) you want to run the extensions from. 

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'")

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.

Mike

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

As an example to what Mike said, in the setup.py you can add all your required modules in the "install_requires" array. 

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


https://dynatrace-extensions.github.io/dt-extensions-python-sdk/guides/extension_structure.html#setu...





Thank you @DavidMass. I no longer see that error. Getting other errors now but I know how to fix them. Much appreciated!

Featured Posts