Getting Started with Raspberry Pi Pico

I’ve just shared a new tutorial: “Getting Started with Raspberry Pi Pico”


5 Likes

Perfect timing!

1 Like

It’s also the perfect time for me, becaus I just got two Raspberry Pi picos.

2 Likes

Trying to get rshell installed and having problems. I installed python on windows 10 and seems to be working fine. When I use powershell and do the command:
pip install rshell
I get:
Requirement already satisfied: rshell in c:\users\rob\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (0.0.28)
Requirement already satisfied: pyserial in c:\users\rob\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from rshell) (3.5)
Requirement already satisfied: pyudev>=0.16 in c:\users\rob\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from rshell) (0.22.0)
Requirement already satisfied: pyreadline in c:\users\rob\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from rshell) (2.1)
Requirement already satisfied: six in c:\users\rob\appdata\local\packages\pythonsoftwarefoundation.python.3.9_qbz5n2kfra8p0\localcache\local-packages\python39\site-packages (from pyudev>=0.16->rshell) (1.15.0)

It doesn’t actually create an executable. Help or advice? Thanks!

1 Like

Can you start an rshell session? Looks like it might already be installed.

1 Like

No - rshell returns:

rshell : The term ‘rshell’ is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • rshell
  •   + CategoryInfo          : ObjectNotFound: (rshell:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

Have tried finding rshell.exe on the machine in case it is simply a path error but no luck.

1 Like

Hi Rob,

Do you have multiple versions of python installed? pip might be associated with the wrong python version - hence the issues.

See here for a possible solution:

1 Like

Hi all! I received my Pico boards this morning and have been setting up python to start working on some programming. Python and Pip seem to be installed correctly but every time I type rshell -V after installing I get these errors:

Traceback (most recent call last):
** File “C:\Program Files\Python310\Scripts\rshell-script.py”, line 33, in **
** sys.exit(load_entry_point(‘rshell==0.0.31’, ‘console_scripts’, ‘rshell’)())**
** File “C:\Program Files\Python310\Scripts\rshell-script.py”, line 25, in importlib_load_entry_point**
** return next(matches).load()**
** File “C:\Program Files\Python310\lib\importlib\metadata_init_.py”, line 162, in load**
** module = import_module(match.group(‘module’))**
** File “C:\Program Files\Python310\lib\importlib_init_.py”, line 126, in import_module**
** return _bootstrap._gcd_import(name[level:], package, level)**
** File “”, line 1050, in _gcd_import**
** File “”, line 1027, in _find_and_load**
** File “”, line 1006, in _find_and_load_unlocked**
** File “”, line 688, in _load_unlocked**
** File “”, line 883, in exec_module**
** File “”, line 241, in _call_with_frames_removed**
** File “C:\Program Files\Python310\lib\site-packages\rshell\command_line.py”, line 1, in **
** import rshell.main**
** File “C:\Program Files\Python310\lib\site-packages\rshell\main.py”, line 80, in **
** import readline**
** File “C:\Users\AppData\Roaming\Python\Python310\site-packages\readline.py”, line 34, in **
** rl = Readline()**
** File “C:\Users\AppData\Roaming\Python\Python310\site-packages\pyreadline\rlmain.py”, line 422, in init**
** BaseReadline.init(self)**
** File “C:\Users\AppData\Roaming\Python\Python310\site-packages\pyreadline\rlmain.py”, line 62, in init**
** mode.init_editing_mode(None)**
** File “C:\Users\AppData\Roaming\Python\Python310\site-packages\pyreadline\modes\emacs.py”, line 633, in init_editing_mode**
** self._bind_key(‘space’, self.self_insert)**
** File “C:\Users\AppData\Roaming\Python\Python310\site-packages\pyreadline\modes\basemode.py”, line 162, in _bind_key**
** if not callable(func):**
** File “C:\Users\AppData\Roaming\Python\Python310\site-packages\pyreadline\py3k_compat.py”, line 8, in callable**
** return isinstance(x, collections.Callable)**
AttributeError: module ‘collections’ has no attribute 'Callable’

I am unsure what I am doing wrong? I have searched all over google and tried these following methods:

  1. Reinstall Python and Pip
  2. Make sure path is set during install
  3. Installed system wide for all users
  4. Disable 256 Character limit
  5. Set environment variables in my Path directory to where my python scripts are
  6. Running powershell as admin (because I kept receiving this error when trying to overwrite files: Defaulting to user installation because normal site-packages is not writeable)
  7. Specified version numbers (e.g. “pip3 install rshell”)

It also doesn’t install the same as shown in the Core Electronics rshell tutorial…

Sorry for such a long post but I’m quite amateur at Python and I’m honestly stumped to what I’m doing wrong?

2 Likes

Lol so I actually found out how to fix it, was going to delete this thread but thought I’d share the answer for anyone in the same boat because this was a pain in the butt.

So for starters I should’ve read the error better but to fix it all you have to do is navigate to the pyreadline folder in appdata then change this following line in the file py3k_compat.py:

Change “return isinstance(x, collections.Callable)” to “return isinstance(x, collections.abc.Callable)”

Then run rshell -V and the version number should now show.

3 Likes

Hi Oldmate,

Welcome to the forum!!

Thanks for sharing! Hopefully another maker can save some time with the tips you’ve provided :smiley:
PS: Nice name :laughing:

Liam.

1 Like