0

I have Pycharm 3.4 community edition installed. I want to update my installation to 4.0.

Going to Help ⇒ Check for update shows me that I am in latest version which is 3.4.1.

Manual download and installation creates 2 separate installations of Pycharm; one new and one previous installation.

  • 1
    Yes, its like pain... even i update pycharm-community-4.0.1, I also search on the web, but no answer, So, i think there is no direct update process from old to new version. You have to delete your old pycharm directory and then install new one. – bud-e Nov 30 '14 at 9:33
1

I recently updated from 4.0.1 to 4.0.4, which I had installed in /usr/local/bin/ (I'm new to Linux, so I'm not sure if this is the best location). Essentially I moved the tarball there, unpacked it, deleted the old directory, realized the script was still pointed at the old (now nonexistent) version, and edited the script to point at the new version. It went like this (adapted from official installation instructions):

sudo mv ~/Downloads/pycharm-community-4.0.4.tar.gz /usr/local/bin/
cd /usr/local/bin/
tar xfz pycharm-community-4.0.4.tar.gz
sudo rm pycharm-community-4.0.4.tar.gz
sudo rm -r pycharm-community-4.0.1
cd pycharm-community-4.0.4/bin/
sudo bash pycharm.sh

PyCharm launched, so I assumed I was good. I then tried to launch PyCharm as I usually would, and got the following error:

Traceback (most recent call last):
  File "/usr/local/bin/charm", line 96, in <module>
    os.execv(RUN_PATH, [bin_file] + args)
OSError: [Errno 2] No such file or directory

Oops; I assumed the charm script to which the PATH points (in /usr/local/bin/) would be updated by the bash pycharm.sh line; I was wrong. No worries, it's easy enough to do yourself.

cd /usr/local/bin/
sudo nano charm

The first line after the import statements defines the RUN_PATH; you'll want to change this to point to the new directory (i.e., 4.0.1 to 4.0.4 for me). Once I did that, it worked like a charm.

My guess is that if I had removed this file before running the script in the new version's bin folder, it would've created a new script from scratch. This is probably a better practice, as the script itself may be changed more meaningfully than the RUN_PATH definition.

TL;DR: You'll need to delete the old directory and launch script, unpack the new directory, and run the launch script from inside the unpacked directory.

sudo mv ~/Downloads/pycharm-community-4.0.4.tar.gz path/to/install/
cd path/to/install/
tar xfz pycharm-community-4.0.4.tar.gz
sudo rm pycharm-community-4.0.4.tar.gz
sudo rm -r pycharm-community-<old version>
sudo rm charm
cd pycharm-community-4.0.4/bin/
sudo bash pycharm.sh
  • why are you running PyCharm as superuser?? :O – törzsmókus Nov 28 '16 at 13:36
  • > I'm new to Linux – Kyle Joecken Dec 4 '16 at 3:10
  • “Don't take the name of root in vain.” src This is one of the first things you should learn before copypasting commands into a terminal. – törzsmókus Dec 4 '16 at 17:52
  • I don't anymore, but 18 months ago I knew nothing. Now I know only slightly more than nothing. I vaguely remember that the original install said I didn't have permissions at the time, but I don't remember why; my answer was to throw sudo on the front. I do know that's bad now. Honestly since this answer got no votes and wasn't accepted, I just left it alone. Thanks for keeping me honest, though. – Kyle Joecken Dec 5 '16 at 19:09
  • Excellent answer, regarding the Traceback error, because of which I could not use IDEA as a merge/diff tool with igt. IDEA does not update the paths after an update. I just needed to update the paths in the /usr/local/bin/idea file. It works now! – DrKaoliN May 25 '17 at 7:19
1

I believe the best practice is to install all tar balls in /usr/local/src.

Also, you don’t have to move the tar ball, you can specify where to unzip to using the -C (change extraction destination?) specifier so it becomes (this assumes the old version is located in /usr/local/src as it should be):

sudo tar xzf pycharm-community-4.0.4.tar.gz -C /usr/local/src
cd /usr/local/src
sudo rm -r pycharm-community-4.0.1  
sudo rm /usr/local/bin/charm
cd pycharm-community-4.0.4/bin/
sudo sh pycharm.sh
1

I installed PyCharm in ~/bin directory. I created this directory manually. So the IDE files were in a directory like ~/bin/pycharm-community-3.x.x. To update it I did the following,

  • Deleted the folder ~/bin/pycharm-community-3.x.x
  • Deleted the folder ~/.PyCharm30 (directory used by PyCharm for storing settings, caches etc.)
  • Downloaded the latest version of the IDE and installed it.

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.