$ platformio upgrade --dev
Error: You can't upgrade with this command because PlatformIO
was installed from debian package. If needed please uninstall first
with "apt remove" and follow link bellow to install manually
* Upgrade using `pip install -U platformio`
* Try different installation/upgrading steps:
https://docs.platformio.org/page/installation.html
I’m looking for an alternative installation method, but it’s still a bit extreme that the latest package from such a wildely used distribution cannot be used. Should I look into opening an issue in the package bug tracker?
Get:64 http://archive.ubuntu.com/ubuntu groovy/universe amd64 platformio all 4.3.4-1 [581 kB]
4.x is what I’d consider as legacy, the 5.x core is the latest. There have been changes to the PlatformIO package repository since 4.x. I would say that that is probably the most likely issue source.
Per platformio · PyPI 4.3.4 is from May 2020, as opposed to 5.1.1 (latest stable) from March 2021. Ubuntu seems really behind the times here.
The installation methods are listed at Redirecting.... There is a helper script, or just install python3-pip and then sudo -H pip3 install platformio.
Thanks for the reply. I’ve opened a bug in launchpad. In the meantime, I tested using python3-pip and then pip3 install platformio solves our immediate issue.
How can the distribution package team know when a version is no longer supported?
Upon running pio test -v -e native, the CI fails with error Error: Unknown development platform 'native'.
Edit: I can run the same command on my system (NixOS unstable, PIO 5.0.4). Maybe I’m missing something? The exact build commands of the failing build are available here.
> pio test -e native
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items
Processing * in native environment
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Building...
Testing...
test\test1.cpp:10:TrivialTestCase [PASSED]
-----------------------
1 Tests 0 Failures 0 Ignored
OK
=============== [PASSED] Took 1.08 seconds ===============
can you check if this is a bug in 5.1.1 by executing a pio upgrade --dev after installation to get to the latest version?
root@503d37aeaee2:/# mkdir test
root@503d37aeaee2:/# cd test/
root@503d37aeaee2:/test# pio init -b uno
******************************************************************************************************************************************************************************************************************************************************************************************
<snip, PlatformIO social>
******************************************************************************************************************************************************************************************************************************************************************************************
The current working directory /test will be used for the project.
The next files/directories have been created in /test
include - Put project header files here
lib - Put here project specific (private) libraries
src - Put project source files here
platformio.ini - Project Configuration File
Project has been successfully initialized! Useful commands:
`pio run` - process/build project from the current directory
`pio run --target upload` or `pio run -t upload` - upload firmware to a target
`pio run --target clean` - clean project (remove compiled files)
`pio run --help` - additional information
root@503d37aeaee2:/test# cat << EOF > platformio.ini
> [env:native]
> platform = native
> EOF
root@503d37aeaee2:/test# cat << EOF > src/test1.cpp
> #include <unity.h>
>
> void TrivialTestCase(void)
> {
> TEST_ASSERT_EQUAL(32, 32);
> }
>
> int main() {
> UNITY_BEGIN();
> RUN_TEST(TrivialTestCase);
> UNITY_END();
> return 0;
> }
> EOF
root@503d37aeaee2:/test# pio test -e native
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items
Processing * in native environment
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error: Unknown development platform 'native'
root@503d37aeaee2:/test#
Update: On my local system (NixOS unstable, PIO 5.0.4), I had to move the file to the test directory, but everything works as expected. Doing the same procedure in the docker container did not change the outcome.
It fails for me on Ubuntu 20.04.2 via WSL too. I previously tested on Windows where I also previously worked with the native platform.
$ pio test -e native
Verbose mode can be enabled via `-v, --verbose` option
Collected 1 items
Processing * in native environment
------------------------------------------------------------------------------------------------------------------------
Error: Unknown development platform 'native'
There seems to be quirk that a pio test does not install the platform you’re working on.
Try to do a pio platform install native in the docker container and then re-run the test.
Running pio platform install native and then pio test -v -e native seems to work on my local docker container. I’m doing the necessary changes in the CI to see if it solves the issue.
In the meanwhile it would ofc be good to get PIO core 4.x to build ESP32 projects again, so maybe @ivankravets can try and reproduce the issue described in the first two posts (and ignore the rest for now as it’s been filed as a bug now)
All data have been moved to the EU with PlatformIO Core 5.0. Please upgrade PlatformIO Core to 5.0. I recommend using our installation script instead of native Linux packages. See Redirecting...
You can use your Python package manager and install PlatformIO Core via pip install --user platformio.
My CI has also broken with the upgrade. MuscleOxygen: add batterystatus support · cujomalainey/antplus-arduino@6fad78c · GitHub @ivankravets something clearly broke since there was no change to the ini. Thanks to posted solution i was able to get it back up and running by manually installing the platform. Its like unit tests fail to check remote for the platform if its not local (ran on 5.1.1)