How to install pycharm under ubuntu

References:

1 , https://www.cnblogs.com/zhcncn/p/4027025.html

2,https://blog.csdn.net/yybj/article/details/43086393

First, to install pycharm, you must first install JDK

 

(1) Return to the Home directory: "~", and then execute several commands in turn

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

During the installation process, the Oracle license dialog box will pop up, just choose to accept.

(2) After the installation is complete, run "java -version" or "javac -version" to see if the installation is successful. If you get output similar to the following, the installation was successful.

$ java -version
java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)
$ javac -version
javac 1.8.0_20

(3) In [3], if you want to automatically set up the Java 8 environment variables, you can use the following command:

sudo apt-get install oracle-java8-set-default

Second, configure the environment variables of the java home

 

(1)Find out the path of your Java installation:

sudo update-alternatives --config java

It will return a result similar to the following, listing all the Java Runtime Environment JREs installed on the machine. (There are 2 in total: JDK7 and OpenJDK6, 0 and 2 are the same, the difference between auto mode and manual mode)

copy code
There are 2 choices for the alternative java (providing /usr/bin/java).

Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-oracle/jre/bin/java          1062      auto mode
  1            /usr/lib/jvm/java-6-openjdk-amd64/jre/bin/java   1061      manual mode
  2            /usr/lib/jvm/java-7-oracle/jre/bin/java          1062      manual mode

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

The corresponding installation paths of each JRE are:

0. /usr/lib/jvm/java-7-oracle

1. /usr/lib/jvm/java-6-openjdk-amd64

2. /usr/lib/jvm/java-7-oracle

(2) Edit the /etc/environment file

Copy the above path /usr/lib/jvm/java- 8 -oracle and add the following line

JAVA_HOME="/usr/lib/jvm/java-8-oracle"

(3) Reload the file to make it effective immediately without having to log out and log in again

source /etc/environment

(4) Use the following command to test

echo $JAVA_HOME

The path /usr/lib/jvm/java-8-oracle just set will be output.

Three, install pycharm

(1) cd to the Downloads/pycharm-community-3.4.1/bin/ directory and execute ./pycharm.sh. Ask whether to import settings, choose not to import -> OK.

image

(2) Initial setting, keep the default -> OK.

575D0ZC`9]VL5A8A@C)%)U8

(3) Create a Launcher script that requires a password.

image

(4) The following screen appears, indicating that the installation is successful.

] 0RBN} ANEVT {8 (BEG] Z {P0I

(5) Create New Project, create a test project, the interpreter selects Python2.7 by default.

`H2I[1FUMP~A`J}UQ``]%GG



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325382615&siteId=291194637