One bad solution is to comment out the aiorpcx version check so no error gets raised. No idea what kind of problems that could cause. I recommend against this solution.
According to the commit that removed version 0.22.x from the requirement, it could cause memory leak.
Reference:
github.com/spesmilo/electrumx/commit/df390187eeed7c48fda2c94d5ffb04742c722778There's a url in the comments linking to the related aiorpcX issue opened by the Electrum developer who applied the commit above.