Package Manager Errors on Raspberry Pico W

195 views
Skip to first unread message

Dean Harry Smith

unread,
Dec 24, 2023, 12:15:45 PM12/24/23
to thonny
Hi,
Just got my first Pico, I can connect just fine to the Pico and run simple stuff and now trying to add my first micropython package which is for my Pimoroni BME280 but I keep getting errors, Any help please would be great.

I am using Thonny 4.1.4 with it set to MicroPython (Raspberry Pi Pico) USB Serial Device @ COM3

install --progress-bar off micropython-bme280==2.1.3
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\cli\base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\cli\req_command.py", line 247, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\commands\install.py", line 315, in run
    session = self.get_default_session(options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\cli\req_command.py", line 98, in get_default_session
    self._session = self.enter_context(self._build_session(options))
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\cli\req_command.py", line 125, in _build_session
    session = PipSession(
              ^^^^^^^^^^^
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\network\session.py", line 343, in __init__
    self.headers["User-Agent"] = user_agent()
                                 ^^^^^^^^^^^^
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\network\session.py", line 175, in user_agent
    setuptools_dist = get_default_environment().get_distribution("setuptools")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 180, in get_distribution
    return next(matches, None)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 175, in <genexpr>
    matches = (
              ^
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\metadata\base.py", line 594, in iter_all_distributions
    for dist in self._iter_distributions():
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 168, in _iter_distributions
    for dist in finder.find_eggs(location):
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 136, in find_eggs
    yield from self._find_eggs_in_dir(location)
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_internal\metadata\importlib\_envs.py", line 103, in _find_eggs_in_dir
    from pip._vendor.pkg_resources import find_distributions
  File "C:\Users\Dean\AppData\Local\pipkin\cache\workspaces\2a0e6a6b1d9bea51102e5dcad2965a15\Lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2164, in <module>
    register_finder(pkgutil.ImpImporter, find_on_path)
                    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
Error Command '['C:\\Users\\Dean\\AppData\\Local\\pipkin\\cache\\workspaces\\2a0e6a6b1d9bea51102e5dcad2965a15\\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-bme280==2.1.3', '--index-url', 'http://127.0.0.1:36628']' returned non-zero exit status 2.

Reply all
Reply to author
Forward
0 new messages