Ubuntu16.04 Installation pycharm+ Configuration TensorFlow

Source: Internet
Author: User

Under Ubuntu16.04, python2.7 and python3.5 are installed by default, and in the terminal, enter "Python" or "python3" to view the specific version.

1. Configure the Pycharm JDK environment before installing pycharm

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


Start the tutorial below

First download the installation package at the Pycharm website

Links: https://www.jetbrains.com/pycharm/download/#section =linux

Choose the platform for Linux, here is divided into professional professional and Community Community Edition, the difference is that the professional version is charged, and more functions, specifically what function I did not understand carefully. I choose Professional Professional version, directly click Download Download on the line

After the download is complete, the installation package is under the Downloads folder.

Right button installation package, click "Extract here" meaning is extracted here, equivalent to decompression.

In the terminal specified to the Pycharm/bin directory, and then enter "Sh./pycharm.sh"


After the carriage return, appears the complete installation bomb frame,

If you need to import a previously installed version of the configuration, choose the first, not the second one.

So select the second one, click OK directly, as follows:

Click OK after the pop-up pycharm privary Policy Agreement box, Privacy Policy Agreement, direct Click Accept agreed to


The Pycharm License activation box will then pop up, pycharm license activation

Activation license with Activation License selection: License Server

I installed the version is 2018, I entered is:

http://im.js.cn:8888, then click Activate to activate.

If it is 17 version, look at the beginning of my connection to activate the part, if not successful, and then Baidu other connection:

https://blog.csdn.net/m0_37407756/article/details/79312781

Enter the interface being installed and wait for installation to complete

When the installation is complete, the pycharm Initial configuration box pops up, pycharm the initialization configuration

Keymap Scheme: Keyboard scheme, choose Eclipse, meaning to set Pycharm as Eclipse shortcut key

IDE Theme: Skin theme, Default IntelliJ. You can choose other according to your preference.

Editor Colors and fonts: the theme of the editor, you can click the "click to hide Preview" preview below, I choose Darcula here

Then the following Create desktop entry default tick on the line

Finally click OK to complete the setup

Then you create a new project, create a new py file in a parallel directory, and enter

Import TensorFlow as TF

Open this py file in the Pycharm.

And then:


Look at the picture, write too much trouble. If you have a good configuration. This is the choice of Python3, you use PIP installed can be used in this, when the python2 is changed will have a different.

After the configuration is finished, look at the previously written py file import TF has no error. No error will be OK.

(I used the PIP (corresponding to the python3.5) to install the TF as well as the Cuda and CUDNN,

If not, please first install your own Baidu CUDA+CUDNN+TF, the installation process to pay attention to the compatibility of version issues. )


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.