thonny: Can't install any modules on Thonny

Hey (sorry for my bad English) i manage to try many things with Tonny text editor, formy rRaspberry Pi Pico (i very like it btw exellent work !) but i have several issues when i tried to install modules (packages). When I began the installation, this error line code appeared:

ERROR: Can not combine '--user' and '--target' Process returned with code 1

But i solved this because my Rasp Pi was not plugged x’)

The problem now is, when i start the installation, its collecting package but stop with an error [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error pip subprocess to install build dependencies did not run successfully. exit code: 1 See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Error Command '['C:\Users\33631\AppData\Local\pipkin\cache\workspaces\b1843a146278d117477687961e4e0504\Scripts\python.exe', '-I', '-m', 'pip', '--no-color', '--disable-pip-version-check', '--trusted-host', '127.0.0.1', 'install', '--no-compile', '--use-pep517', '--upgrade-strategy', 'only-if-needed', 'micropython-ssd1306', '--index-url', 'http://127.0.0.1:36628']' returned non-zero exit status 1.

I’ve seen about a package called “Pipkin” wich is a module who can download packages for Micropython, on PyPi, but i don’t know how to use it. I tried many things, change the directory, install with the cmd and research with the Install from a local file, but it is still not working.

Capture d’écran 2022-11-12 150806


I use:

. Python version: 3.10 . Pip version: 22.3 . Thonny version: 4.0.1

Still working on it, thank in advance 😃

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 31 (6 by maintainers)

Most upvoted comments

When downgrading to thonny 3.3.14 installing packages works again.
I have tried and got this issue both in thonny 4.0.0 and thonny 4.0.1

The problem above is still existing in version 4.1.3. I use a Mac with Ventura installed. There is enough space on my machine. Even the work around mentioned in https://github.com/thonny/thonny/issues/2538#issuecomment-1426854836 does not help.

Any further ideas?

I also am experiencing the same problem installing packages, specifically the micropython-umqtt.simple package.

I just installed Thonny 4.0.2 as suggest with the same result.

I have tried Windows 4.0.1 Linux 4.0.1 and now Windows 4.0.2 all with the same error.

install --user micropython-umqtt.simple Collecting micropython-umqtt.simple Using cached micropython-umqtt.simple-1.3.4.tar.gz (4.0 kB) ERROR: micropython-umqtt.simple from https://files.pythonhosted.org/packages/bd/cf/697e3418b2f44222b3e848078b1e33ee76aedca9b6c2430ca1b1aec1ce1d/micropython-umqtt.simple-1.3.4.tar.gz does not appear to be a Python project: neither ‘setup.py’ nor ‘pyproject.toml’ found. Process returned with code 1

you need to change to “MicroPython (Raspberry Pi Pico)” by clicking at the bottom right where it says “Python”

@magnussommarsjo I took your approach and it worked! I revert to thonny ver.3.3.13 and the package downloads smoothly.

The system I used when having download package issue:

macOS Ventura 13.0.1 Thonny 4.0.1 Python 3.10.8

I’m also seeing this error. Apple M1 with Ventura 13.0

About Thonny reports:

Thonny 4.0 Darwin 22.1.0 Python 3.10.6 Tk 8.6.12

Some packages install OK, e.g. micropython_unittest

When I try to install micropython-umqtt.simple, I get the following:

Looking in indexes: http://127.0.0.1:36628
127.0.0.1 - - [26/Nov/2022 00:27:37] "GET /micropython-umqtt-robust2/ HTTP/1.1" 200 -
Collecting micropython-umqtt.robust2
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 54436)
Traceback (most recent call last):
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 204, in __init__
    super().__init__(request, client_address, server)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 211, in do_GET
    self._serve_file(*path.split("/"))
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 245, in _serve_file
    tweaked_bytes = self._tweak_file(dist_name, file_name, original_bytes)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 312, in _tweak_file
    assert normalize_dist_name(wrapper_dir).startswith(normalize_dist_name(dist_name))
AssertionError
----------------------------------------
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-umqtt-robust2/micropython-umqtt.robust2-2.1.1.tar.gz/
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 54438)
Traceback (most recent call last):
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 204, in __init__
    super().__init__(request, client_address, server)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 211, in do_GET
    self._serve_file(*path.split("/"))
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 245, in _serve_file
    tweaked_bytes = self._tweak_file(dist_name, file_name, original_bytes)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 312, in _tweak_file
    assert normalize_dist_name(wrapper_dir).startswith(normalize_dist_name(dist_name))
AssertionError
----------------------------------------
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-umqtt-robust2/micropython-umqtt.robust2-2.1.1.tar.gz/
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 54440)
Traceback (most recent call last):
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 204, in __init__
    super().__init__(request, client_address, server)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 211, in do_GET
    self._serve_file(*path.split("/"))
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 245, in _serve_file
    tweaked_bytes = self._tweak_file(dist_name, file_name, original_bytes)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 312, in _tweak_file
    assert normalize_dist_name(wrapper_dir).startswith(normalize_dist_name(dist_name))
AssertionError
----------------------------------------
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-umqtt-robust2/micropython-umqtt.robust2-2.1.1.tar.gz/
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 54442)
Traceback (most recent call last):
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 204, in __init__
    super().__init__(request, client_address, server)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 211, in do_GET
    self._serve_file(*path.split("/"))
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 245, in _serve_file
    tweaked_bytes = self._tweak_file(dist_name, file_name, original_bytes)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 312, in _tweak_file
    assert normalize_dist_name(wrapper_dir).startswith(normalize_dist_name(dist_name))
AssertionError
----------------------------------------
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-umqtt-robust2/micropython-umqtt.robust2-2.1.1.tar.gz/
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 54444)
Traceback (most recent call last):
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 204, in __init__
    super().__init__(request, client_address, server)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 211, in do_GET
    self._serve_file(*path.split("/"))
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 245, in _serve_file
    tweaked_bytes = self._tweak_file(dist_name, file_name, original_bytes)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 312, in _tweak_file
    assert normalize_dist_name(wrapper_dir).startswith(normalize_dist_name(dist_name))
AssertionError
----------------------------------------
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /micropython-umqtt-robust2/micropython-umqtt.robust2-2.1.1.tar.gz/
----------------------------------------
Exception occurred during processing of request from ('127.0.0.1', 54446)
Traceback (most recent call last):
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 316, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 347, in process_request
    self.finish_request(request, client_address)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 360, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 204, in __init__
    super().__init__(request, client_address, server)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/socketserver.py", line 747, in __init__
    self.handle()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 432, in handle
    self.handle_one_request()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/server.py", line 420, in handle_one_request
    method()
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 211, in do_GET
    self._serve_file(*path.split("/"))
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 245, in _serve_file
    tweaked_bytes = self._tweak_file(dist_name, file_name, original_bytes)
  File "/Applications/Thonny.app/Contents/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/thonny/vendored_libs/pipkin/proxy.py", line 312, in _tweak_file
    assert normalize_dist_name(wrapper_dir).startswith(normalize_dist_name(dist_name))
AssertionError
----------------------------------------
ERROR: Could not install packages due to an OSError: HTTPConnectionPool(host='127.0.0.1', port=36628): Max retries exceeded with url: /micropython-umqtt-robust2/micropython-umqtt.robust2-2.1.1.tar.gz/ (Caused by ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')))

Error Command '['/Users/mbradley/Library/Caches/pipkin/workspaces/d64e98649188e5065d1f585e6f96486a/bin/python3', '-I', '-m', 'pip', '--no-color', '--disable-pip-version-check', '--trusted-host', '127.0.0.1', 'install', '--no-compile', '--use-pep517', '--upgrade-strategy', 'only-if-needed', 'micropython-umqtt.robust2', '--index-url', 'http://127.0.0.1:36628']' returned non-zero exit status 1.