Raspberry Pi 4

Hi there,

I tried Pycharm on the new Rpi 4, and it was a bit borked in a few places... but after looking around at other IDE's, I found out that replacing openjdk with the oracle version, in raspbian, made for a faster java experience. Then I tried Pycharm again once the new jdk was installed ... and man oh man, is it better, significantly. Plus all the drawing issues it had went away, and now feels like it does on my mac and ubuntu machines ... I jave to now clean up from all the other ide's I tried, and stay happily in Pycharm.... as it should be.

B

2
16 comments

Hi Brett,

Thank you for sharing your experience. I hope you will enjoy using PyCharm on this wonderful device (I'm a fan of Raspberry Pi myself.)

0
Avatar
Permanently deleted user

No Worries, it is a great experience so far, have been using it all week, and no complaints .... adding a second monitor shortly to see how it then performs ... but being able to jump around platforms and still use the same IDE is awesome, thanks.

0

Brett

i am wondering if you might share how you:

- installed pycharm on the rpi 4b

- replaced the openjdk with oracle jdk on the rpi 4b

it would be fantastic to be able to use pycharm on the rpi 4b

Thanks,

Louie

0
Avatar
Permanently deleted user

off the top of my head I don't remember the exact steps, it was a google search that set it all off. I found one way that removed openjdk altogether, and another way that kept both, but allowed you to select which one to use by default. (I have tried both ways and they work)

the method where you keep both is probably best, as some apps reinstall openjdk due to dependancies, when they are getting installed, and you end up with both anyway, but defaulting to openjdk ... 

To install pycharm, I simply copied the install folder off an ubuntu linux box I have here ... and you just have to run something like ...

/pycharm-install-folder/bin/pycharm.sh 

sorry not to be specific, but it wasn't terribly difficult to find the steps to install the "oracle jdk beside openjdk on raspbian"... I'll post another message when I find the link I used.

0
Avatar
Permanently deleted user

and it is fantastic to use on the 4B .... 

0

Brett, 

Thanks for the reply.  I will dig into this more because having pycharm on a the Pi 4B is something i definitely would like to have.  Any clues you can pass along would be greatly appreciated. Your clue about searching for "oracle jdk beside openjdk on raspbian" is excellent.

Louie

0
Avatar
Permanently deleted user

Give this a whirl, it's pretty much what I did ... the last 2 commands may ask for input, you just have to choose the jdk 1.8.0

https://blog.adafruit.com/2014/03/28/how-to-install-oracle-jdk-8-on-raspberry-pi-piday-raspberrypi-raspberry_pi/

0

Brett,

i am currently running pycharm on a raspberry pi 4B with 4gb of ram and so far i have not installed oracle jdk 8 and pycharm seems to be ok so far using the open jdk. i am running a python flask server.  you mentioned pycharm runs better with oracle jdk 8 so i wondering what should i watch out for?  If i run into trouble i will install oracle jdk 8.  thanks for the link to the install instructions.

Louie

oh it is really nice to have pycharm on the pi 4B.  i did not ever put pycharm on a pi 3B+ because it it only had 1 gb of ram

Pycharm Install Steps:

- download pycharm for linux to your Pi 4B 
from https://www.jetbrains.com/pycharm/download/other.html
- put the pycharm-community-2019.2.tar.gz file in the dir where you want to install pycharm
- unzip, untar pycharm
tar xvzf pycharm-community-2019.2.tar.gz
i did this in /home/pi and now have a /home/pi/pycharm-community-2019.2 dir
- see pycharm Install-Linux-tar.txt in the root dir of download
- to run pycharm invoke pycharm.sh
> /home/pi/pycharm-community-2019.2/bin/pycharm.sh
- edit .bashrc to add alias to start pycharm
alias pcm='/home/pi/pycharm-community-2019.2/bin/pycharm.sh'
- exported pycharm keymap on win10 box sent it rpi 4b
import settings and select file
0
Avatar
Permanently deleted user

What I initially noticed was that the "dark" theme had not taken in all panels, it was still the original light interface in some areas. Like the "Loading Project" progress window for eg. 

Also speed was another noticeable gain when using the Oracle version, and less errors if I start in a shell and watch the output.

This is the Oracle jdk

 

and this is with the openJDK 

0

@Brett

By the way, why did you decide to use OpenJDK/OracleJDK in the first place instead of the bundled one by JetBrains? PyCharm installation should have a bundled JDK (Called JetBrains Runtime or JBR) which is the recommended one. Did it not work on Raspberry?

Just in case, this is how to switch: https://intellij-support.jetbrains.com/hc/en-us/articles/206544879-Selecting-the-JDK-version-the-IDE-will-run-under

0

Andrey's comment made me curious about what jdk was being using so i added these echos in pycharm.sh right before "Run The Ide" code.

These values are from a Raspberry Pi 4 (4gb ram) running Raspbian Buster
uname -a     Linux 4.19.58-v7l+ #1245 SMP Fri Jul 12 17:31:45 BST 2019 armv7l GNU/Linux

It is looking like the PyCharm is using Open JDK by default on the PI 4B and not the JBR. I am running a clean install and have not intentionally switched from the JBR to Open JDK.

os_type:                       Linux
ide_home:                    /home/pi/pycharm-community-2019.2
ide_bin_home:             /home/pi/pycharm-community-2019.2/bin
pycharm_jdk:
user_jre:
bundled_jre:                /home/pi/pycharm-community-2019.2/jbr
jdk_path:                     /usr/bin/java
java_home:
java_bin:                     /usr/lib/jvm/java-11-openjdk-armhf/bin/java
java_location:             /usr/lib/jvm/java-11-openjdk-armhf
jdk:                             /usr/lib/jvm/java-11-openjdk-armhf

0

Please try to set JAVA_HOME and PYCHARM_JDK env variables to jbr inside PyCharm installation. The article I've linked previously demonstrates how to switch boot JDK. 

0
Avatar
Permanently deleted user

I installed the latest PyCharm Community Edition on my Rapberry Pi 4 (4GB) and when running it I got a problem with the Terminal:

"Cannot open Local Terminal
Failed to start [/bin/bash, --rcfile, /opt/pycharm-community-2020.1/plugins/terminal/jediterm-bash.in, -i] in /home/pi/WagtailBlog"

Anyone have an idea how I fix this?

0

Seems to be a known issue https://youtrack.jetbrains.com/issue/IDEA-237956

I recommend leaving a comment there and attach your Logs from **Help | Collect Logs and Diagnostic Data**

0
Avatar
Permanently deleted user

I installed IntelliJ IDEA Ultimate Edition and i didn't get any problem. It's working well but slower than other IDE's like Geany, BlueJ etc. Maybe you can use with "Power Save Mode". 

0

Thanks for this thread - was having similar problems; as far as I know I installed with all the defaults, but I was tired when I was doing it....

IntelliJ was basically unusable with OpenJDK; removed and installed the Raspbian default-jdk (no idea why I was on open JDK) and now it runs 1000% better.  It's still slow but is at least usable and will get me by while I save up for something more powerful :)

0

Please sign in to leave a comment.