nginxinc/nginx-amplify-agent

cannot import name 'runner' from 'daemon'

Closed this issue · 9 comments

I can't run it on Ubuntu server 24.04 because Python gives this error, I even tried with other versions (3.10/3.11)

ImportError: cannot import name 'runner' from 'daemon' (/usr/lib/python3/dist-packages/daemon/__init__.py)

@rodrigocabraln there is no package of nginx-amplify-agent for Ubuntu 24.04 at this point, but you can try to install the python3-daemon package which is providing the missing functionality (based on your message). Again, not sure whether that would be enough.

@defanator No, but I think the problem is more with Python, in Fedora 40 i have version 3.12 and python-daemon includes Runner, in Ubuntu 24 i also installed python-daemon but it does not have runner.py, i even tried copying the module folder from my fedora local but the problem persists

Also experiencing this issue. Annoying that we are almost six months into the release of this LTS Ubutnu release and there is no amplify agent available. Anyone have a similarly useful tool to switch to?

I've got nginx-amplify-agent 1.8.2-1~jammy running on Ubuntu 24.04.1 LTS with python 3.12 (in a hurry) by copying the DaemonRunner class from an older version of python-daemon into amplify/agent/common/runner.py and installing python3-pyasyncore.

Hope we get a proper fix soon.

amplify-agent-runner_python312.patch.txt

@maqmigh I can't seem get it to run with your workaround. What version of python3-pyasyncore? I am on 1.0.2-2. Could you possibly attach your working runner.py file? I'm on python 3.12.3 but same amplify and ubuntu versions.

@eric9876-git
python3-pyasyncore 1.0.2-2 all asyncore for Python 3.12 onwards
runner.py.txt

@maqmigh Thank you!

Native package for 24.04 is now available (see #119), so closing this one.