Skip to content

Instantly share code, notes, and snippets.

@speters
Last active January 5, 2024 13:41
Show Gist options
  • Save speters/0dfe879985022fcc7e1d310434a58f3a to your computer and use it in GitHub Desktop.
Save speters/0dfe879985022fcc7e1d310434a58f3a to your computer and use it in GitHub Desktop.
codeanywhere PlatformIO install

PlatformIO install on CodeAnywhere

For the Xenial distribution, there are some fixes needed, as PlatformIOs urllib3 depends on newer SSL libs.

So just get an older urllib3 implementation via PIP and copy over to PlatformIO.

Container

set up a Python container first

On Codeanwhere SSH console

cd ./workspace 
echo sudo python -c "$(curl -fsSL [https://github.com/platformio/platformio-core-installer/raw/develop/get-platformio.py](https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python3 get-platformio.py))"
curl -fsSL -o get-platformio.py https://raw.githubusercontent.com/platformio/platformio-core-installer/master/get-platformio.py
python3 get-platformio.py
sudo apt update
sudo apt upgrade -y
echo "removing PlatformIO's urllib3 it complains about Xenial OpenSSL version"
rm -rf  /home/cabox/.platformio/penv/lib/python3.8/site-packages/urllib3/
pip3 install "urllib3 <=1.26.15"
cp -a /home/cabox/.pyenv/versions/3.8.7/lib/python3.8/site-packages/urllib3 /home/cabox/.platformio/penv/lib/python3.8/site-packages/
pio

~/.ssh/config on host

Host host29.codeanyhost.com
    IdentityFile ~/.ssh/codeanywhere
    User cabox                
    Port 49279                
    UpdateHostKeys no 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment