Under Ubuntu16.04, python2.7 and python3.5 are installed by default. In the terminal, enter "python" or "python3" to view the specific version.
1. Before installing PyCharm, first configure the JDK environment of PyCharm
Pycharm requires JDK environment parsing, otherwise an error will be reported during the installation process.
Execute several commands in turn
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer (The environment package here is large, if the download stops and exits in the middle, it can be executed repeatedly)
During the installation process, the Oracle license dialog box will pop up, just choose to accept.
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.
root@ubuntu:~#java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
root@ubuntu:~# javac -version
javac 1.8.0_66
Configure the Java_home environment
#sudo apt-get install oracle-java8-set-default
#echo JAVA_HOME="/usr/lib/jvm/java-8-oracle" >> /etc/environment [Note: use root, otherwise it will prompt no permission! 】
#source /etc/environment
Ubuntu 16.04 already comes with Python, and then you need to install a Python IDE. I checked the Internet and there are as many as 10 recommended (link: http://www.runoob.com/w3cnote/best-python-ide-for- developers.html ), there are PyCharm, Komodo Edit, PyScripter, The Eric Python IDE, etc. According to the recommendation on the Internet, PyCharm was finally selected.
Let's start the tutorial
First download the installation package from the PyCharm official website
Link: https://www.jetbrains.com/pycharm/download/#section=linux
Select the platform as Linux, you can see that the current version is 2017.1.4, which is divided into Professional Professional Edition and Community Community Edition. The difference is that the Professional Edition is charged and has more functions. I did not understand the specific functions.
I chose Professional Professional Edition, just click DOWNLOAD to download
After the download is complete, the installation package is in the Downloads folder
Right-click the installation package and click "Extract Here", which means to extract it here, which is equivalent to decompression
After the extraction is complete, a folder of pycharm-2017.1.4 will be generated
Specify in the terminal to the pycharm-2017.1.4/bin directory
Enter "cd Downloads/pycharm-2017.1.4/bin"
Execute the sh command to open the installation
Type "sh ./pycharm.sh"
After pressing Enter, wait for about ten seconds (my virtual machine is relatively stuck...), and the Complete Installation pop-up box appears.
If you need to import the configuration of the previously installed version, choose the first one, and if not, choose the second one.
So choose the second one here, just click OK
After clicking OK, the PyCharm Privary Policy Agreement box will pop up, the privacy policy agreement, and click Accept to agree.
Then the PyCharm License Activation box will pop up, and the PyCharm license will be activated.
Activation license with Activation license selection: License server
License server addressLicense server address: http://idea.imsxm.com
Then click "Activate"
Enter the installing interface and wait for the installation to complete
After the installation is complete, the PyCharm Initial Configuration box will pop up, and PyCharm initializes the configuration.
Keymap scheme: keyboard scheme, select Eclipse, which means to set Pycharm as Eclipse shortcut key
ide theme: skin theme, default Intellij. You can choose other according to your liking
Editor colors and fonts: The theme of the editor, you can click "Click to hide preview" below to preview, I chose Darcula here
Then the Create desktop entry below is ticked by default.
Finally click OK to complete the setting
Complete the installation and configuration
Click Craete New Project to create a new project
Select "Pure Python" from the list on the left
The 3.6.1 version that Interpreter chooses to install
Start your Python programming journey~~
Unzip the installed pycharm installation package, unzip and execute pycharm.sh , and follow the default prompts.
refer to:
root@ubuntu:/opt# sudo tar -zxvf pycharm-community-5.0.1.tar.gz
root@ubuntu:/opt# sudo sh pycharm-community-5.0.1/bin/pycharm.sh
Then follow the default prompts and select OK to install.
Usually use to start pycharm , execute sudo sh pycharm-community-5.0.1/bin/pycharm.sh .