Thonny Requiremnt for the paramiko package

368 views
Skip to first unread message

Paul Naish

unread,
Jun 10, 2023, 8:58:50 PM6/10/23
to thonny
I have a PI ZERO W I would like to connect to from a P400 using Thonny with the Interpreter set to 'Remote Python 3 (SSH)'. After I entered the credentials and click OK, the Shell applet in the Thonny screen displays

This back-end requires an extra package named 'paramiko'. Install it from 'Tools => Manage plug-ins' or via your system package manager.

Process ended with exit code 1.

I installed the paramiko package straight using PIP which seemed to fail and corrupt the packages. When I performed  simple test import of paramiko, Python crashed with 'Illegal instruction'. I also got the same error for any PIP operation.

Running Python in verbose (-v) mode, I found the offending package was a dependency called bcrypt. I manually removed bcrypt then was able to remove parmiko using pip uninstall.

I then found the installation instructions for paramiko which suggests the dependencies need to be manually installed first.

I would like to run the PI ZERO W headless which means remote access from Thonny on another platform would be advantegous.

Before I try the installation of paramiko again, can some confirm it needs to be installed on the ZERO and not P400 where Thonny is running?

Thanks

Paul Naish

unread,
Jun 11, 2023, 11:31:10 AM6/11/23
to thonny
It seems paramiko cannot be installed on a ZERO W because the dependency package bcrypt shows the 'illegal instruction'. This means you cannot use Thonny remote to a headless ZERO W. Thonny remote to a PICO W with micropython does work as I've been using that extensively.

I manually installed bcrypt including using the recommended prerequisite 'sudo apt-get install build-essential cargo'. When  I did a simple test 'import bcrypt, Python3 aborted with 'illegal instruction'.

I opened a bcrypt bug report on this.

Paul Naish

unread,
Jun 11, 2023, 6:15:04 PM6/11/23
to thonny
This is getting more curious.

I realized I had other Thonny installations I could try this from. The following allowed me to access the ZERO W for using remote Python 3 (SSH).
  • Thonny 3.3.13 on a Windows 10 PC
  • Thonny 4.0.1 on a Raspberry 3B
I reinstalled Thonny 4.0.1 using 'apt purge' on the P400 but always got the same error of the requirement for paramiko

I finally purged Thonny 4.0.1 and installed 4.0.2 using the bash script from the download page. This worked.

So, with 4.0.2 I can develop ZERO W Python apps from my P400 which I am glad of.
Reply all
Reply to author
Forward
0 new messages