Pio remote agent fail to start on Fedora 36

I’m having issues trying to run the remote agent with pio remote agent start on a Fedora 36 box. Already tried all this thread’s suggestions. This is the command output:

$ pio remote agent start

Collecting twisted[tls]==22.1.0
  Using cached Twisted-22.1.0.tar.gz (3.7 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting attrs>=19.2.0
  Using cached attrs-22.1.0.tar.gz (201 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting Automat>=0.8.0
  Using cached Automat-20.2.0.tar.gz (61 kB)
  Preparing metadata (setup.py) ... done
Collecting incremental>=21.3.0
  Using cached incremental-21.3.0.tar.gz (17 kB)
  Preparing metadata (setup.py) ... done
Collecting zope.interface>=4.4.2
  Using cached zope.interface-5.4.0.tar.gz (249 kB)
  Preparing metadata (setup.py) ... done
Collecting typing-extensions>=3.6.5
  Using cached typing_extensions-4.3.0.tar.gz (47 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting constantly>=15.1
  Using cached constantly-15.1.0.tar.gz (21 kB)
  Preparing metadata (setup.py) ... done
Collecting hyperlink>=17.1.1
  Using cached hyperlink-21.0.0.tar.gz (140 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting service-identity>=18.1.0
  Using cached service-identity-21.1.0.tar.gz (40 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting idna>=2.4
  Using cached idna-3.3.tar.gz (286 kB)
  Preparing metadata (setup.py) ... done
Collecting pyopenssl>=16.0.0
  Using cached pyOpenSSL-22.0.0.tar.gz (178 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting six
  Using cached six-1.16.0.tar.gz (34 kB)
  Preparing metadata (setup.py) ... done
Collecting cryptography>=35.0
  Using cached cryptography-38.0.1.tar.gz (599 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp_mn7g98e
       cwd: /tmp/pip-install-h6qj6dys/cryptography_694b1c1cc2c14d6293f2a9208361f780
  Complete output (29 lines):

          =============================DEBUG ASSISTANCE==========================
          If you are seeing an error here please try the following to
          successfully install cryptography:

          Upgrade to the latest pip and try again. This will fix errors for most
          users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
          =============================DEBUG ASSISTANCE==========================

  Traceback (most recent call last):
    File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 143, in _get_build_requires
      self.run_setup()
    File "/usr/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 17, in <module>
      from setuptools_rust import RustExtension
    File "/tmp/pip-build-env-9tz6bez2/overlay/local/lib/python3.10/site-packages/setuptools_rust/__init__.py", line 1, in <module>
      from .build import build_rust
    File "/tmp/pip-build-env-9tz6bez2/overlay/local/lib/python3.10/site-packages/setuptools_rust/build.py", line 23, in <module>
      from setuptools.command.build import build as CommandBuild  # type: ignore[import]
  ModuleNotFoundError: No module named 'setuptools.command.build'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/6d/0c/5e67831007ba6cd7e52c4095f053cf45c357739b0a7c46a45ddd50049019/cryptography-38.0.1.tar.gz#sha256=1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7 (from https://pypi.org/simple/cryptography/) (requires-python:>=3.6). Command errored out with exit status 1: /usr/bin/python3 /usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp_mn7g98e Check the logs for full command output.

Hi, I do use fedora 36, and was having this problem few days earlier. My solution is

update libraries: sudo dnf install libpython3-devel libffi-devel openssl-devel
update pio through pip: pip install -U platformio

These might seem redundant, but turns out I have a missing dependency that was required for pio remote

Good luck

Thank you, tried it, but no way.
A minor detail, is python3-devel in Fedora, no libpython3-devel, right?
Regards

Hi, I have two laptops running on fedora 36. One of them is affected even though it works 2 days ago, while another one is fine. It encounter the same issue as you do
ModuleNotFoundError: No module named 'setuptools.command.build'

Yes, there are problems with Fedora. I still couldn’t get it to work. If I find the solution, I’ll post it here.

Same here. When I do “pio remote agent start”, I get (after a lot of package processing):

File “/home/embedded/.platformio/packages/contrib-pysite/twisted/logger/_interfaces.py”, line 10, in
from zope.interface import Interface
ModuleNotFoundError: No module named ‘zope’

This is happening on Fedora 36 on both a Raspberry Pi and an x86_64 laptop.