4

There is PyCharm, an IDE for programming Python. It's available in a Community edition for Linux as well. The problem affects (at least) version 2017.3.3.

I installed it as a normal user with

wget https://download.jetbrains.com/python/pycharm-community-2017.3.3.tar.gz
tar -xzf pycharm-community-2017.3.3.tar.gz
mv pycharm-community-2017.3.3 pycharm
rm pycharm-community-2017.3.3.tar.gz
cd pycharm/bin
./pycharm.sh

The remaining installation steps are guided by a wizard:

  • do not import settings
  • accept license
  • Darcula theme
  • create a startup script
  • install Markdown support
  • confirm warning about granted permissions
  • create a new project, create virtual environment
  • wait for installation of setuptools, pip, wheels etc.
  • close startup tips
  • wait until indexing is done
  • wait until skeletons are built
  • wait until packages are scanned

So far, everything is fine.

However, even when all those steps have completed successfully, PyCharm hangs in several situations, e.g.

  • when loading a project (sometimes)
  • when typing code into a .py file (sometimes)
  • when running the project (always)

What is the cause and how can I fix it?

I have installed the Rasbian IMG file from 2017-11-29 and performed sudo apt-get update and sudo apt-get upgrade prior to the PyCharm installation.

2

The problem is related to the Java version. In my case, the Java version is

$ java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

The same version is also mentioned in the PyCharm about dialog.

You may not have noticed it, but PyCharm displays a message in the event log.

IDE's Java runtime (1.8u65), which may cause instability. Update to version 1.8.0u144 or higher.

The solution is to be to update to a newer Java version. However,

sudo apt-get update
sudo apt-get upgrade

will not install a new version.

However,

sudo apt-get purge oracle*
sudo apt-get update
sudo apt-get upgrade
sudo apt-get remove oracle*
reboot

solved the problem and OpenJDK was installed. You should confirm that with a Java version check:

$ java -version
openjdk version "1.8.0_151
OpenJDK Runtime Environment (build 1.8.0_151-8u151-b12-1-deb9u1-b12)
OpenJDK Client VM (build 25.151-b12, mixed mode)

Since then, PyCharm operated totally fine for us.

You could also download and install a Java version manually, but since we are teaching kids, we wanted to have a simple OS-supported solution.

  • Oracle Java 8 u161 is available from their download page, although if you don't need Oracle for whatever reason you might as well use the Ice-T version. – goldilocks Feb 21 '18 at 14:17
  • it seems this solution didnt work on Windows 10 , pycharm is still slow , but why is this problem ? – Lutaaya Huzaifah Idris Mar 6 '18 at 12:46
  • @LutaayaHuzaifahIdris: you run PyCharm on Windows 10 IoT on Raspberry? – Thomas Weller Mar 6 '18 at 13:07
  • No i dont use Raspberry , just my ycharm doesnt work well its slow on Windows 10 but my PC is 8gb , 500HD and an I core 5 , but its slow and freezes alot – Lutaaya Huzaifah Idris Mar 6 '18 at 13:11
  • @LutaayaHuzaifahIdris: ok, just a side note: this is the wrong forum to ask such a question, because this site is Raspberry specific. I can just say PyCharm Community Edition 2017.1.5 runs fine on my machine on JRE 1.8.0_112. However that's not the latest version of PyCharm. Maybe such a question is on-topic on SO, such as this: stackoverflow.com/questions/10363526/… – Thomas Weller Mar 6 '18 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.