pyrexecd icon indicating copy to clipboard operation
pyrexecd copied to clipboard

Installing PyRexecd on python 3.12

Open damies13 opened this issue 10 months ago • 1 comments

I ran into some issues with installing PyRexecd on python 3.12, so I'll list the issues here and any workarounds I found in the hope it helps someone.

Issues:

  1. paramiko.py3compat - everything appeared to install without issue, but PyRexec.pyw won't run, so to troubleshoot I tried import pyrexecd in python, this gave me
>>> import pyrexecd
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\Python312\Lib\site-packages\pyrexecd\__init__.py", line 28, in <module>
    from paramiko.py3compat import decodebytes
ModuleNotFoundError: No module named 'paramiko.py3compat'
>>> print(pyrexecd.__file__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'pyrexecd' is not defined
>>>

so it seems paramiko.py3compat was deprecated with paramiko version 3.0.0, so I used pip install paramiko==2.12.0 to downgrade to a version that has paramiko.py3compat

  1. TripleDES has been moved - After downgrading paramiko I tried import pyrexecd in python again, this now gave me
>>> import pyrexecd
C:\Program Files\Python312\Lib\site-packages\paramiko\pkey.py:82: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0.
  "cipher": algorithms.TripleDES,
C:\Program Files\Python312\Lib\site-packages\paramiko\transport.py:253: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from cryptography.hazmat.primitives.ciphers.algorithms in 48.0.0.
  "class": algorithms.TripleDES,
>>>

This is just a warning and doesn't stop the module loading (yet)

  1. i still can't run PyRexec.pyw from the windows command line, but found it in the python scripts directory even though that directory is in my path. so instead I ran c:\program files\python312\scripts\pyrexecd.pyw
  2. use ssh-keygen in windows to generate the public key for step 3 of the install instructions (this was not obvious to people not familiar with doing this). now I'm at the point I get ERROR:root:No authorized_keys found! so it seems I didn't get step 3 of the install instructions right, I copied my id_ed25519.pub file to AppData\Roaming\PyRexecd but still get this error.

This is as far as I got so far.

damies13 avatar Mar 07 '25 00:03 damies13

Ok made a little more progress,

in AppData\Roaming\PyRexecd create a folder called ssh, in that folder create a text file called authorized_keys, then edit this text file, then open id_ed25519.pub with notepad, and paste the contents of id_ed25519.pub into the authorized_keys` file and save.

now when I run :\program files\python312\scripts\pyrexecd.pyw there are no errors in the log, just the message:

INFO:root:Sshdir: 'C:\\Users\\username\\AppData\\Roaming\\PyRexecd'

but the application just launches and quits immediately, so I'm not sure where to go from here. I feel like I'm close to getting it working but not quite there?

damies13 avatar Mar 07 '25 00:03 damies13