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

ERROR: Could not find a version that satisfies the requirement pyodbc

Yosi_Neuman
DynaMight Guru
DynaMight Guru

Hi guys,

Trying to compile EF2 code which need to import pyodbc and receiving the follow error  

 

 

{
  "error": [
    "ERROR: Could not find a version that satisfies the requirement pyodbc (from matrix-boi-dbquery) (from versions: none)",
    "ERROR: No matching distribution found for pyodbc",
    "Traceback (most recent call last):",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\runpy.py\", line 196, in _run_module_as_main",
    "    return _run_code(code, main_globals, None,",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\runpy.py\", line 86, in _run_code",
    "    exec(code, run_globals)",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\Scripts\\dt-sdk.exe\\__main__.py\", line 7, in <module>",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\typer\\main.py\", line 338, in __call__",
    "    raise e",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\typer\\main.py\", line 321, in __call__",
    "    return get_command(self)(*args, **kwargs)",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\click\\core.py\", line 1157, in __call__",
    "    return self.main(*args, **kwargs)",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\typer\\core.py\", line 728, in main",
    "    return _main(",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\typer\\core.py\", line 197, in _main",
    "    rv = self.invoke(ctx)",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\click\\core.py\", line 1688, in invoke",
    "    return _process_result(sub_ctx.command.invoke(sub_ctx))",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\click\\core.py\", line 1434, in invoke",
    "    return ctx.invoke(self.callback, **ctx.params)",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\click\\core.py\", line 783, in invoke",
    "    return __callback(*args, **kwargs)",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\typer\\main.py\", line 703, in wrapper",
    "    return callback(**use_params)",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\dynatrace_extension\\cli\\main.py\", line 114, in build",
    "    wheel(extension_dir, extra_platforms, extra_index_url, find_links)",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\dynatrace_extension\\cli\\main.py\", line 227, in wheel",
    "    run_process(command, cwd=extension_dir)",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\dynatrace_extension\\cli\\main.py\", line 410, in run_process",
    "    return subprocess.run(command, cwd=cwd, env=env, check=True)  # noqa: S603",
    "  File \"C:\\Users\\yosin\\AppData\\Local\\Programs\\Python\\Python310\\lib\\subprocess.py\", line 526, in run",
    "    raise CalledProcessError(retcode, process.args,",
    "subprocess.CalledProcessError: Command '['C:\\\\Users\\\\yosin\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python310\\\\python.exe', '-m', 'pip', 'download', '-d', 'extension/lib', '--only-binary=:all:', '--platform', 'linux_x86_64', '.']' returned non-zero exit status 1.",
    ""
  ],
  "detailedOutput": [
    "+"
  ]
}

 

 

Python is 3.10.11 and pyodbc is 5.1.0

Yosi_Neuman_1-1726342131261.png

Yosi_Neuman_0-1726342060512.png

Running python code that utilize pyodbc from vscode works with no issue 

Any suggestion what is wrong here?

Thanks

Yos 

 

 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel
2 REPLIES 2

Hi Yos,

I had the same issue and found when you compile your code on windows when it tries to download the Linux module as well it doesn’t find a version supported. 

To get around this you need to specific only the windows version by setting the python enviorment to win_amd64 and mine then was able to  build and deploy.

 

https://developer.dynatrace.com/develop/dynatrace-extensions-vscode/settings/#python-environment 

Kind regards 

Brett

Thanks @brett_schubach1 

Adding win_amd64 to the setting solve the issue !

Yosi_Neuman_0-1726346605628.png

All the best and stay safe

Yos 

dynatrace certificated professional - dynatrace master partner - Matrix Soft Ware Division - Israel

Featured Posts