Posts: 97
Joined: Fri May 10, 2013 4:52 pm

platformio on raspberry pi

Wed Oct 11, 2017 5:42 pm

I've been using my pi's as portable programmers for arduinos, attiny* atmel chips and esp8266 devices. I've found platformio is great for this, especially on a pi because you can use the command line if you don't want to fire up a full xwindows session to develop on these platforms. But I've started running into some consistent issues with platformio on all my pis and depending on what versions of raspbian and what tools I installed using apt, the same series of problems occur in various combinations on all of them. Most of them revolve around either pip, setuptools or pyserial, so I wrote a script to set up a new pi with platform io so it runs properly. I figured others wanting to play with platformio on a pi might find it useful:

Code: Select all


## install python if it isn't already installed, e.g. ##
#sudo apt-get install python

# remove problematic dist versions of pip and pyserial
sudo apt-get remove python-pip -y
sudo apt-get remove python-pyserial -y
# optional - python-serial includes other dependencies that can be cleaned up
sudo apt-get autoremove

# install pip
sudo easy_install pip
## alternate method
#sudo python

# force reinstall of setuptools and pyserial using python/pip tools
sudo pip install setuptools --force-reinstall -I
sudo pip install pyserial --force-reinstall -I
# install/update platformio
sudo pip install platformio -U
platformio update

Posts: 33
Joined: Sat Dec 05, 2015 9:38 pm

Re: platformio on raspberry pi

Sun Apr 15, 2018 6:30 pm

Thanks for posting!

Return to “Raspberry Pi OS”