Installing PyRexecd on python 3.12
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:
- paramiko.py3compat - everything appeared to install without issue, but
PyRexec.pywwon't run, so to troubleshoot I triedimport pyrexecdin 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
- TripleDES has been moved - After downgrading paramiko I tried
import pyrexecdin 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)
- i still can't run
PyRexec.pywfrom the windows command line, but found it in the python scripts directory even though that directory is in my path. so instead I ranc:\program files\python312\scripts\pyrexecd.pyw - use
ssh-keygenin 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 getERROR:root:No authorized_keys found!so it seems I didn't get step 3 of the install instructions right, I copied myid_ed25519.pubfile toAppData\Roaming\PyRexecdbut still get this error.
This is as far as I got so far.
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?