thonny: Can't install package
Hi, I’m trying to install a package to a raspberry pi pico. I get the following error (seems independent of the package):
install --progress-bar off micropython-ssd1306
PROBLEM IN THONNY'S BACK-END: Exception while handling 'install_distributions' (AssertionError).
See Thonny's backend.log for more info.
You may need to press "Stop/Restart" or hard-reset your MicroPython device and try again.
Process ended with exit code 1.
Followed by:
Traceback (most recent call last):
File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/tkinter/__init__.py", line 1921, in __call__
return self.func(*args)
File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/plugins/pip_gui.py", line 355, in _on_install_click
self._perform_pip_action("install")
File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/plugins/pip_gui.py", line 818, in _perform_pip_action
if self._has_remote_target():
File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/plugins/pip_gui.py", line 1059, in _has_remote_target
return proxy.supports_remote_files()
AttributeError: 'NoneType' object has no attribute 'supports_remote_files'
Backend log has:
[MainThread] ERROR thonny.backend: Exception while handling 'install_distributions'
Traceback (most recent call last):
File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/backend.py", line 285, in _handle_normal_command
response = handler(cmd)
File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/plugins/micropython/mp_back.py", line 960, in _cmd_install_distributions
assert not any([arg.startswith("-") for arg in args])
AssertionError
And then the board disconnects. Any suggestions? I can write files to the board, the REPL works etc.
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Reactions: 1
- Comments: 20 (2 by maintainers)
I got the same issue here on all my students’ PCs and Macs when trying to install picozero using the package manager. Older version 4.0.2 works fine. Bumping up for dev’s attention. If you’re just trying to install picozero like me though, you can go to picozero’s webpage, copy the code from picozero.py and save it into the raspberry pi pico controller as a workaround.
I’m now using vscode (following this guide) & got libraries installed with pipkin as follows:
python3.10 -m venv venvsource venv/bin/activatepip install pipkinpipkin install micropython-ssd1306HTH!
Same here on MacOS Monterey. Older versions 4.0.1 and 3.3.13 work fine.
Yeah, I was similarly confused, but basically: pip install pipkin pipkin install <package>
“Just works” with the board plugged in!
Or above, if you want venvs, that works too.
Don’t people test their software before releasing it? But thanks for the workaround 👍