element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog Installing PyCharm on Raspberry Pi 4  (Updated: 02-27-2021)
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Raspberry Pi requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: gam3t3ch
  • Date Created: 12 Sep 2019 5:14 AM Date Created
  • Views 13534 views
  • Likes 7 likes
  • Comments 24 comments
Related
Recommended
  • pycharm
  • python
  • raspberrypi

Installing PyCharm on Raspberry Pi 4  (Updated: 02-27-2021)

gam3t3ch
gam3t3ch
12 Sep 2019

Once you play around with all the IDE's available for python on Raspberry Pi you tend to want to play with PyCharm since well its probably what you have installed on your desktop or laptop.  Good news get it up and running on the pi in no time.   This is one of my favorite ones but tend to use MU IDE on smaller projects.

 

When it come's to the Raspberry Pi, even old issues come up and new fixes come to light.  Today I was playing around and found a new fix for our PyCharm issues.  I have had ton's of feedback on youtube about some of the more common issues that come up so lets get all of those sorted and get everyone up and running.  Let's check out the new method below and lets get programming!

-------------------------------------------------------------------------------

----------------------------NEW METHOD--------------------------------

-------------------------------------------------------------------------------

 

You can follow along on the video below.  This is the updated fix as of February 27, 2021

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

This video also shows how to setup the shortcut in your programming menu on the pi which sometimes doesn't like to populate.

 

You can download PyCharm community edition from: https://www.jetbrains.com/pycharm/download/#section=linux

And read about Martin's fix and download the files from here: http://youtrack.jetbrains.com/issue/IDEA-237956

 

I will also have the file below and will remove the file if Martin requests.

 

 

 

 

 

I am keeping the old fix below as it may still be useful for some users I will also updated any new things I come across that might help further.

-------------------------------------------------------------------------------

-----------------------------OLD METHOD--------------------------------

-------------------------------------------------------------------------------

Go to https://www.jetbrains.com/pycharm/download/

download the linux community version

in the downloads folder on your pi extract the files by right clicking on it and choosing extract here

open terminal  press ctrl+alt+t

Type: cd Downloads    then press enter

Type: ls       then press enter

you should see pycharm-community-2019.2.2

or something similar to that.


Type: sudo mv pycharm-community-2019.2.2 /opt/pycharm-community-2019.2.2    then press enter

Type: cd  then press enter

Type: cd /opt/pycharm-community-2019.2.2/bin   then press enter

Type: ./pycharm.sh then press enter

 

*if for some reason you are getting a Java error on the command run this sudo apt-get install openjdk-11-jdk

 

Then run the setup,  defaults usually work but read through and adjust to your liking

 

once welcome to pycharm shows up in the bottom you will see a configure cog click on that then select create desktop entry.

Select for all users you will have to enter your pi password for this part you will be prompted.


Create new project and then set your name for it and run.

It might take a few minutes for the program to load for the first time.

You will see the status in the bottom of the program running.

If you don’t have an icon on your desktop it is probably in the programming section in the raspberry icon then you can right click and add it to your desktop if you choose.

 

Fix For Terminal not working.

A big thank you to https://github.com/tuomastik  for the terminal fix you can use the code below or check it out on github.

https://github.com/jetbrains/pty4j/issues/82

 

open terminal (Ctrl+Alt+T on the keyboard)

git clone https://github.com/JetBrains/pty4j.git

cd pty4j/native

gcc -fPIC -c *.c

gcc -shared -o libpty.so *.o

cp libpty.so /opt/pycharm/lib/pty4j-native/linux/x86/

 

That’s it start playing with python!

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Attachments:
https://community.element14.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-86/Patch.tar
  • Sign in to reply

Top Comments

  • clem57
    clem57 over 3 years ago +2
    Thanks gam3t3ch for the link. That is a great idea for an IDE. Nano not so great for Python.
  • DAB
    DAB over 2 years ago +2
    Nice tutorial on getting started with Pycharm. DAB
  • ikostan
    ikostan over 2 years ago in reply to ikostan +2
    Actually I figured that out. Since I am using 64 bit Linux version, the last step should be as following: cp libpty.so /opt/pycharm-community-2020.2/lib/pty4j-native/linux/x86_64/ The main problem that…
  • colporteur
    colporteur over 1 year ago

    Can you tell me if PyCharm terminal support has changed?

     

    I moved away from using PyCharm to using Visual Studio Code (VSC) because of terminal support. Running the python script in Pycharm was only supported in the license version of the product and not in the educational version. Opening an external terminal window to run the script was the norm. After discovering I could click a button and execute the python scripts from the window I was editing the script, bam I was motivated to move to VSC.

     

    I miss the familiarity of pycharm. VSC has more overhead but to get the feature to run a script inside the editing window was great. I have perfected the process supporting VSC on a Raspberry Pi. I'm to entrenched to move now.

     

    Just curious.   

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • raspgraph
    raspgraph over 1 year ago

    Got Pycharm 2021.2 working ok thank you. And Terminal works good without the above mods. Using local New Os Bullseye(32bit) on pi4. But the following comments come up :-

     

    1st

    Although described in above comments  how to remove this comment

     

    Unfortunately, JetBrains does not officially support native file watcher for this architecture. Please follow these instructions to compile it yourself.

     

    How can you improve file changes sync which it says may be slow?

     

     

    2nd

    Please consider switching to the bundled Java runtime that is better suited for the IDE (your current Java runtime is 11.0.13+8 by Raspbian at '/usr/lib/jvm/java-11-openjdk-armhf').

    Shall I do this?

    next Q how?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • gam3t3ch
    gam3t3ch over 1 year ago in reply to raspgraph

    image

    there ya go that should be what you want to disable there.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • gam3t3ch
    gam3t3ch over 1 year ago in reply to raspgraph

    just go to setting and then search for file watcher and turn it off..... since its on a arm device its going to happen.  Currently not at my pi but if you cant find it ill grab some images in a couple for you.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • raspgraph
    raspgraph over 1 year ago

    Thanks for researching and solving Terminal issue. Good Job

     

     

    However the following still appear in Event Log (don't they also for you?)

     

    External file changes sync may be slow  ... native watcher not supported

     

    Consider Built in Java

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube