[Learn Python from scratch] Python Development Environment configuration under Ubuntu14.10, pythonubuntu14.10

Source: Internet
Author: User

[Learn Python from scratch] Python Development Environment configuration under Ubuntu14.10, pythonubuntu14.10

1. Preface

Recently, I have been studying some computer vision algorithms and have just started to use linux. I tried to use qt + openCV for development in ubuntu. It feels okay, however, as a high-level explanatory language widely used in academic fields, Python is also widely used in the field of computer vision. So I bought a book titled python computer vision, I plan to learn python from scratch, and first try to use python for cv development.


2. Development Environment

I am using the latest 64-bit Ubuntu14.10 system. There may be some differences in the configuration methods of different versions.

First of all, install the python package first. ubuntu usually comes with the python environment. Enter python -- version in shell to view the version.


For example, my version is 2.7.8.

Here, we can insert a sentence: python has two major versions, one is 2.7 and the other is 3.3. The two versions of python are somewhat incompatible, and although it has been around for a long time, but there are still many important extension packages that do not support 3, so here I recommend that new users choose 2.7 like me = _ =

Of course, if you can also download the installation package on the official website to install: https://www.python.org/downloads/


Decompress the downloaded installation package and enter the directory. Enter the command:./configure -- prefix =$ {pwd}

$ {Pwd} is the installation directory. Just write the directory you want to install, and then make, sudo make install

After installation, you must configure the environment path:

Sudo gedit/etc/profile

Add your own path to the end of the file

PATH = "$ PATH:/PATH/Python-2.7.8"

Export PATH

Well, now we have configured python. Of course, most people have pre-installed python. At this time, you only need to open the shell and input python:


We can directly perform python operations through shell, which is similar to matlab.


3. IDE

To learn a programming language, it is necessary to select a good IDE, which not only saves time, but also improves efficiency and reduces code error rates.

I am also a beginner in python. After finding a circle on the internet, I still installed eclipse silently ~ \ (Too many rows )/~)

This time, I was a little lazy and found the eclipse installation from the source:

Sudo apt-get install eclipse

Start eclipse after installation. The interface is as follows. I think most people who have experience in java, php, or Android programming should be familiar with this interface .. I will not introduce it too much.


Next, install python plug-in pyDev. First, find install new software under the help tool bar on the top.


Click add, name input PyDev, Location: http://pydev.org/updates (update address of PyDev)


Select the PyDev version you want to install. Remember to remove the show only the lastest versions fo available software option. We recommend that you do not install the latest version. A bug may occur.


Finally, configure the path of python and third library in windows-Preference. For details, see:




3. Engineering Example

Next, try a small project. Right-click the project panel and choose new-project from the shortcut menu:


Select PyDev Project and enter the Project name:


After you click Finsh, the hello world project will appear on the project panel:


Right-click hello world and choose new-PyDev Module from the shortcut menu.


Select an empty Module:


Write a simple code and right-click Run as-Python Run to get the running result:



Now, the python configuration is complete. Next, we will update the installation and use of the PIL image processing class library in python.


(For more information, see the author and Source:Shawn-HTHttp://blog.csdn.net/shawn_ht)

Related Article

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.