keijack / python-eureka-client

A eureka client written in python. Support registering your python component to Eureka Server, as well as calling remote services by pulling the the Eureka registry.
MIT License
187 stars 44 forks source link

0.11.6 breaking - missing dependencies #74

Closed bowman-david closed 1 year ago

bowman-david commented 1 year ago

During pip installation of the latest py-eureka-client (0.11.6), error message complains about missing ifaddr dependency:

ModuleNotFoundError: No module named 'ifaddr'

keijack commented 1 year ago

What version of pip do you use?

bowman-david commented 1 year ago

@keijack

I have replicated this on Windows 10 + Python 3.9 with pip 21.2.3 and pip 22.3.1 and took a few minutes to write out my replication steps, in case my original comment was a little unclear/sparse.

Reproduction Steps:

  1. Wipe your installed modules:

    pip freeze > existinginstalls.txt 
    pip uninstall -r existinginstalls.txt -y
  2. pip install the project with the py-eureka-client dependency.

    pip install -r requirements.txt 
  3. Run a script or module that imports py-eureka-client (in this case, the actual running app is a FastAPI app with Uvicorn) -- some user/app/path/module name sanitization below.

    File "C:\mypath\.\src\main.py", line 7, in <module>
    from mymodule import eureka_registration
    File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\mymodule\eureka_registration.py", line 5, in <module>
    import py_eureka_client.eureka_client as eureka
    File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\py_eureka_client\eureka_client.py", line 42, in <module>
    import py_eureka_client.netint_utils as netint
    File "C:\Users\username\AppData\Local\Programs\Python\Python39\lib\site-packages\py_eureka_client\netint_utils.py", line 26, in <module>
    from ifaddr import get_adapters
    ModuleNotFoundError: No module named 'ifaddr'
keijack commented 1 year ago

Please use 0.11.7

bowman-david commented 1 year ago

Thank you, @keijack! Will pull and test this out tomorrow!