lost and found ( for me ? )

Python IDE: Pycharm on ubuntu 13.10

Here is trial and error logs when installing Pycharm.

# tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 13.10"
root@ubuntu:~# uname -ri
3.11.0-12-generic x86_64
root@ubuntu:~# python --version
Python 2.7.5+

download pycharm from http://www.jetbrains.com/pycharm/
I downloaded community edition.
# tar xzvf pycharm-community-3.0.1.tar.gz
# cd pycharm-community-3.0.1/bin



need JDK to run pycharm.
# ./pycharm.sh
ERROR: Cannot start PyCharm
No JDK found. Please validate either PYCHARM_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.

[ install oracleJDK]

install oracle jdk instead of open JDK.
# tar xzvf jdk-7u45-linux-x64.tar.gz
# mkdir /usr/local/java
# mv jdk1.7.0_45 /usr/local/java/

configure JAVA_HOME and add the path for jdk1.7.
# cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jdk1.7.0_45"
JAVA_HOME=/usr/local/java/jdk1.7.0_45
export JAVA_HOME

configure jdk1.7.0 as default
root@ubuntu:/home/hattori# update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_45/bin/java" 1

root@ubuntu:/home/hattori# update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_45/bin/javac" 1
update-alternatives: /usr/bin/javac (javac) を提供するために 自動モード で /usr/local/java/jdk1.7.0_45/bin/javac を使います

root@ubuntu:/home/hattori# update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.7.0_45/bin/javaws" 1
update-alternatives: /usr/bin/javaws (javaws) を提供するために 自動モード で /usr/local/java/jdk1.7.0_45/bin/javaws を使います



# LANG=C update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

 Selection    Path                                            Priority   Status
------------------------------------------------------------
 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
 1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
* 2            /usr/local/java/jdk1.7.0_45/bin/java             1         manual mode

Press enter to keep the current choice[*], or type selection number: 2


# java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)



when using openjdk, you will see following warning.
I could use pycharm with open JDK, however I installed oracle JDK.
$ ./pycharm.sh
WARNING: You are launching the IDE using OpenJDK Java runtime.

        ITS KNOWN TO HAVE PERFORMANCE AND GRAPHICS ISSUES!
        SWITCH TO THE ORACLE(SUN) JDK BEFORE REPORTING PROBLEMS!

NOTE:    If you have both Oracle (Sun) JDK and OpenJDK installed
        please validate either PYCHARM_JDK, JDK_HOME, or JAVA_HOME environment variable points to valid Oracle (Sun) JDK installation.
        See http://ow.ly/6TuKQ for more info on switching default JDK.

Press Enter to continue.



[ run pycharm ]

after installing oracle JDK, run pycharm.sh

configure which python version you use
gui -> configure -> settings -> python interpreters


create a new project

then create a python file ( right click “project name” -> new -> python file )


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.