Installing piicodev for raspberry pi on Thonny error

Having trouble installing piicodev from Thonny for raspberry pi 4…it worked before BOOKWORM update or could there be some other problem.

3 Likes

I had a similar issue on my pico W. I had to manually download/install the piivodev files.

2 Likes

Hey Robin,

It looks like bookworm may be causing a bunch of issues (as new releases tend to do) I will have a look into it and see what’s going on as this is the first time I am hearing about this issue.

Cheers,
Blayden

2 Likes

Hey Robin,

As it turns out, Bookworm has removed Pip installs from the current OS so it will make package management a bit different. We are working on a solid solution right now to get it figured out.

Cheers,
Blayden

1 Like

You could install the piicodev package (as well as any other pancakes you need) in a Python virtual environment, then set Thonny to use the Python executable in your virtual environment.

I haven’t tried this but it should work.

2 Likes
2 Likes

Tried the link in the virtual environments in Thonny…but it seems that that option for virtual environment doesn’t exist under Thonny options/ interpreter now.

1 Like

Hey Robin,

image

Once you’re on this view under Tools > Options > Interpreter, you can select Local Python 3 and then provide the path to the virtual environment. If you need to active a virtual environment, you can hit New Virtual Environment down in the bottom right to do so, and use the appropriate activate scripts (a batch file for windows, or the source CLI tool for bash) from your command line in order to install pip packages in that environment:

P.S. For anyone reading this in future, these are all workarounds at the moment. I expect there’ll be a new solution soon for the deployment of Python packages either with or without Pip instead. Otherwise, if you’re just looking for the raw PiicoDev MicroPython Modules, you can grab them straight from the repos available below:

Hi,
Are there any updates on this? I still cannot use PiicoDev in Thonny.

It sounds like something system-level is at play and it may be best to just move on with the project.

As a fallback @Jacob258201 you can just download the source files into your working directory.

Every tutorial (for Pico) shows how to download the PiicoDev_Unified.py file and the relevant device driver file. Follow these steps, download the files into the directory where you will write your code and everything ought to work - completely sidestepping the Thonny package manager.

thank you very much, it worked. Appreciate the help.

1 Like

I’m really pleased to hear you’re past this friction point and able to move on with your project :slightly_smiling_face:

Happy Making!