Open danielroehrig opened 4 years ago
It seems you run CLion from another shell (system) where PATH is not updated. Could you try to run CLion from a Terminal where you have access to pio --version
?
You were right. I needed to add the PlatformIO path to my .profile. Thanks for your help.
Hello, @ivankravets. I have the same problem but I already added the path for the bin folder in PATH variable.
export PATH="$PATH:/home/wir_wolf/.platformio/penv/bin"
@wirwolf could you leave "Path to PlatformIO Core CLI" input empty and launch CLion from the shell where platformio
is visible?
It seems CLion starts from the shell where platformio
is not avaialble.
If Path to PlatformIO Core CLI input is empty i can not create a new project using PlatformIO. On the platform, I see an empty area.
@elmot what is the mechanism for checking if "PlatformIO utility is not found"? Thanks.
I run into the same issue (Ubuntu), is related to https://youtrack.jetbrains.com/issue/CPP-29187/Clion-and-PlatformIO-using-defaults-does-not-find-the-PIO-installation. Clion don't use the PATH Variable from .bashrc, as suggested in the issue i tried to start clion from cli but i don't fixed the issue for me.
The following workaround works fine for me (create symlinks instead of appending to the PATH)
ln -s ~/.platformio/penv/bin/platformio /home/<username>/.local/bin/platformio
ln -s ~/.platformio/penv/bin/pio /home/<username>/.local/bin/pio
ln -s ~/.platformio/penv/bin/piodebuggdb /home/<username>/.local/bin/piodebuggdb
I run into the same issue (Ubuntu), is related to https://youtrack.jetbrains.com/issue/CPP-29187/Clion-and-PlatformIO-using-defaults-does-not-find-the-PIO-installation. Clion don't use the PATH Variable from .bashrc, as suggested in the issue i tried to start clion from cli but i don't fixed the issue for me.
The following workaround works fine for me (create symlinks instead of appending to the PATH)
ln -s ~/.platformio/penv/bin/platformio /home/<username>/.local/bin/platformio ln -s ~/.platformio/penv/bin/pio /home/<username>/.local/bin/pio ln -s ~/.platformio/penv/bin/piodebuggdb /home/<username>/.local/bin/piodebuggdb
It does the job:
mkdir -p $HOME/.local/bin/ && ln -s $HOME/.platformio/penv/bin/platformio $HOME/.local/bin/platformio && ln -s $HOME/.platformio/penv/bin/pio $HOME/.local/bin/pio && ln -s $HOME/.platformio/penv/bin/piodebuggdb $HOME/.local/bin/piodebuggdb
Here's the complete steps to the workaround:
Make this folder
~/.local/bin
Run these commands:
ln -s ~/.platformio/penv/bin/platformio ~/.local/bin/platformio
ln -s ~/.platformio/penv/bin/pio ~/.local/bin/pio
ln -s ~/.platformio/penv/bin/piodebuggdb ~/.local/bin/piodebuggdb
Open CLion and in the PlatformIO settings, DELETE ALL THE TEXT in the field asking for the path.
Apply / OK
Open a new PlatformIO project ... TA DA!
In CLion 2023.2.2, opened a new project, selected platformIO, selected "settings" in "PlatformIO not found" dialog, erased whatever location I had put in earlier, used the folder button to navigate to /usr/local/bin where the alias to platformIO resides (used shift-command-. to reveal hidden folders), and that's when CLion took over and said "I got this". Now it works.
@elmot, PlatformIO Core is installed to the ~/.platformio/penv/
folder when using the Installer Script. Could you look for pio.exe
in this folder if it was not found in the default $PATH? The location of pio
depends on the host OS:
Windows: %HOME_DIR%/.platformio/penv/Scripts/pio.exe
Unix: ~/.platformio/penv/bin/pio
Configuration
Operating system: Linux 5.9.8-2-MANJARO, Manjaro
PlatformIO Version (
platformio --version
): 5.0.3Description of problem
PlatformIO seems to be installed and in path and i can execute pio commands from any terminal, but clion refuses to recognize it.
Steps to Reproduce
Actual Results
Get the error message: PlatformIO utility is not found but installed
Expected Results
Set up new project