I. Objectives
Implement/python Development with Pycharm debugging tools under Linux
Linux uses the Vi/vim tool to write Python, disadvantages: Debugging inconvenient, no code hints, jump and many other functions.
Windows uses Idle/pycharm/eclipse and so on, environment package installation trouble. Well-written code often has to migrate to a Linux server environment.
Workaround: Install the Pycharm compiler directly in the Linux environment.
Attached: About Pycharm
Pycharm is a Python IDE with a set of tools to help users improve their productivity when using the Python language development, such as debugging, syntax highlighting, project management, code jump, smart hints, auto completion, unit testing, versioning. In addition, the IDE provides advanced features to support professional web development under the Django framework.
II. process of implementation
2.1. Installation Pycharm
Pycharm Download Address: http://www.jetbrains.com/pycharm/download/(recommended to select Open Source community version)
2.2 Installing the Pycharm JDK environment
Pycharm requires JDK environment resolution, otherwise the error will be in the installation process.
Execute a few command in turn
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install Oracle-java8-installer(where the environment package is larger, such as the end of the download stop, repeated execution can)
The Oracle License dialog box will be selected for acceptance during the installation process.
When the installation is complete, run "java-version" or "javac-version" to see if the installation is successful. If you get an output similar to the following, the installation is 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
Configuring the Java_home Environment
#sudo apt-get Install Oracle-java8-set-default
#echo java_home= "/usr/lib/jvm/java-8-oracle" >>/etc/environment
#source/etc/environment
2.3 Installation pycharm.sh
Unpack and install the Pycharm installation package, unpack and execute pycharm.sh, follow the default prompt.
Reference:
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 to select OK down to install.
Normally use start pycharm, perform sudo sh pycharm-community-5.0.1/bin/pycharm.sh.
(1, reference page: http://www.cnblogs.com/zhcncn/p/4027025.html)
Third, Ubuntu Chinese input method
Here introduce Ubuntu14.04 install Sogou Input method, and realize pycharm can use Sogou Input method.
3.1 Installation Sogou Input method
(1): Uninstall FCITX
sudo apt-get purge fcitx*
(2): to Sogou website to download sogou Pinyin Input method, select your system corresponding to the software package, my system is 64, so I chose the AMD64
Http://pinyin.sogou.com/linux/?r=pinyin
(3): With Gdebi This software installation, it can install all dependencies, if you do not install Gdebi, please install the software first;
#sudo apt-get install Gdebi
#sudo gdebi sogou_pinyin_linux_1.0.0.0014_amd64.deb
(2, reference page: http://tieba.baidu.com/p/3020246301)
3.2 Change pycharm.sh to support Chinese input
Sogou Chinese input in Linux under other programs can be used normally, Linux under the Pycharm can not use the Chinese input method.
This is related to the application environment of the Pycharm program. Add the following 3 options to the pycharm.sh configuration file:
Export GTK_IM_MODULE=FCITX
Export QT_IM_MODULE=FCITX
Export xmodifiers= @im =FCITX