1. Preface
Recently in the study of computer vision some algorithms, also just started to contact Linux, try to use QT+OPENCV under Ubuntu to develop, feel OK. But Python is a high-level interpretive language widely used in the academic world. It is also widely used in the field of computer vision. So I bought a book, "Python Computer vision," to learn about Python from scratch, and first tried to develop CVS in Python.
2. Development environment
I now use the latest 64-bit Ubuntu14.10 system, there may be some differences in the different version number configuration methods
First of all, of course, first install the Python package, Ubuntu will always bring your own Python environment, under the shell input:python--version can see the version number
For example, my version number is 2.7.8.
In this case, Python now has a major two version number. One is 2.7, one is 3.3, the two version number of the program is a bit incompatible, and although 3 has been a long time, but there are many important expansion packs are not supported by 3. So here I still recommend the novice to the same as I choose 2.7 Bar =_=
Assuming, of course, you're also able to take the official Web download install package installation: https://www.python.org/downloads/
Unzip the downloaded installation package into the folder and enter the command:./configure--prefix=${pwd}
${pwd} is the installation folder. Just write the folder you want to install, and then make ,sudo and install
After installation, of course, you will also configure the environment path:
sudo gedit/etc/profile
Add your own path at the end of the file
Path= "$PATH:/own Path/python-2.7.8"
Export PATH
All right. Our Python configuration is complete and, of course, I think most of them are preloaded with Python. You just need to open the shell and enter Python:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvc2hhd25fahq=/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/southeast ">
We can do python directly from the shell, which is a bit like matlab.
3. IDE
To learn a programming language, it is necessary to choose a good IDE. Not only saves time, but also improves efficiency and reduces code error rates.
I am also a beginner of python myself. After searching the internet for a lap or silently installing eclipse (Eclipse Dafa good ~\ (≧▽≦)/~)
This time steal a lazy. Find eclipse installed directly from the source:
sudo apt-get install eclipse
Start eclipse When you are finished installing. Interface for example, I think most people with java,php or Android programming experience should be very familiar with this interface.
And I'm not introducing too much.
The next step is to install the Python plugin Pydev, first we find the top toolbar help under the install new software
Click Add,name input Pydev,location:http://pydev.org/updates (Pydev's update address)
Then select the Pydev version number you want to install. Remember to leave show only the lastest versions fo available software this option removed. It is recommended that you do not install the latest version number, which may cause a bug.
The final step is toconfigure the path to Python and the third library under windows-preference, see:
3. Project Demo sample
Next, write a small project, and under the Project panel, right-click the popup menu to select New-project:
Select Pydev Project, and then enter the name of project:
When you click Finsh, a project project with Hello World will appear on the project panel:
Right click on Hello World and select New-pydev Module in the popup menu.
Let's choose an empty module:
Write a simple code and right-click the run As-python run to get the result:
Well, the Python configuration ends here, and the next update is for the installation of the PIL image processing class library under Python.
(reprint please indicate author and source: Shawn-ht http://blog.csdn.net/shawn_ht)
"Learn python from zero" Ubuntu14.10 Python development environment configuration