Python 3 usage, installing packages and running?

Hi Folks
Anybody have any success using python3-specific code on board their companion RPi? I have an ADC board that I need to use and it is python3-only. I see that python 3 and 3.4 are present on the RPi companion build, but I can’t get anything to work using python3, step 1 being using pip3 to install some packages related to my hardware. Anybody have any advice? I admit to being fairly python illiterate.

Hi Richard,

Can you specify what is your exactly problem ?
You should explain what is your actual problem rather than your attempted solution.
Please, include more information with details about your problem and if you tried to do something about this, share what you have done and the details if possible.
If you can, please provide screenshots, code output, a minimal example, step-by-step to replicate your problem and etc, anything that can help us to identify what you are facing, this will certainly help you and us to find the best solution for you :slight_smile: .

The exact wiring configuration depends on the vehicle configuration and the hardware used. The following are the standard channel assignments. Please see the frame configurations for standard thruster numbering.

Hi Folks
Reviving an old thread here, I’m having the same problem with a new build that I did last year-- namely, I need a Python version higher than 3.4 on the onboard RPi, but whatever I do I end up with Python building/installing without SSL support, even though all the required SSL modules are present. This means I can’t use PIP, which means I can’t get the code I need to install to talk to the accessory boards I’m trying to use. I’ve been following instructions like the ones ones found here:

Or slight variations, with Python 3.8.0 and 3.8.5, same result. Any Python masters here who could help out?

Richard, our companion image is in desperate need of a linux update, many of the packages (including python) are far out of date.

This is something we are working to resolve, but it will be some time before we have an updated release.

In the meantime you have a few options to work around this limitation:

  • disable ssl in pip using –trusted-host or similar (I have not tested it, but do some searching about ‘pip no ssl’)
  • install your python packages from source eg. git clone the python package to download the source code, then run pip install --user . within the source directory (where setup.py is located)
  • install companion on the latest raspbian image which includes python 3.7 using steps described here (still in development!)

Thanks for the suggestions, Jacob. I can’t seem to get options 1 or 2 to work, so I’m going to try #3, I’ll let you know how it goes. If that doesn’t work I’ll start again with a fresh companion image and try again. I know I somehow got it to work last year around this time but it was probably dumb luck and I can’t remember how in any event.

What is the problem that you are facing with this instructions ? It should work.

Hi Patrick
Attempting steps 1 and 2 from Jacob’s suggestion list just fail, usually with a cascade of messages about missing SSL modules but sometimes with other pip-related missing file or access problems. My general Linux ineptitude probably doesn’t help. I solved my problem for the short term by cloning the companion install from the vehicle where I got all this to work somehow last summer. It has Python 3.6.3 installed without any issues and pip works fine. I updated the companion install to the current version and updated various other things too and everything still works.

Hi Richard,

Glad that everything is working. Sorry if I was not clear, but I was talking about the medium article.

Ah yes, those are excellent instructions, but I still end up with python (I’ve tried 3.8 and 3.8.5) installed without the correct references or connections to openssl. Without ssl pip and numerous other things won’t work. I’ve seen other references to this happening after doing some googling but the solutions I’ve found either don’t seem to apply to my circumstances or the descriptions of fixes are way over my Linux-feeble head (i.e. not a simple step-by-step like that medium article, just references to things I don’t know where to find, how to do, etc.)