How to install Python

Source: Internet
Author: User

If we want to install Python in freebsd, how can we achieve a simple operation? First, we will introduce a simple Python Installation Method for one of the applications.

First su to the root account

Enter/usr/ports/lang/Python26

Then directly make

 

 

 

The entire Python installation process has been compiled for a long time...

Then make install

It's a long wait...

Install them as needed.

 
 
  1. ====  
  2. --------------------------------------------------------  
  3. This package was built with the experimental POSIX  
  4. semaphore support. Please ensure that the kernel on the  
  5. system where you deploy this package is either compiled  
  6. with 'option P1003_1B_SEMAPHORES', or has the sem.ko  
  7. kernel module loaded.  
  8. -------------------------------------------------------- 
  9. ===> Compressing manual pages for Python26-2.6.1_2 
  10. ===> Running ldconfig  
  11. /sbin/ldconfig -m /usr/local/lib 
  12. ===> Registering installation for Python26-2.6.1_2  
  13. hwt# 

Congratulations, Python is successfully installed.

Then input hwt # Python

Enter the following Python Development Environment

 
 
  1. Python 2.5.4 (r254:67916, Apr 13 2009, 18:09:11)   
  2. [GCC 4.2.1 20070719 [FreeBSD]] on freebsd7  
  3. Type "help", "copyright", "credits" or "license" 
    for more information.  
  4. >>>  

Input print 'Hello money'

Appears

 
 
  1. >>> print 'hello money'  
  2. hello money  
  3. >>> 

Congratulations, the first Python program has come out.

The third variable is not required to exchange two input values.

 
 
  1. >>> a,b=1,2  
  2. >>> a,bb=b,a  
  3. >>> a,b  
  4. (2, 1)  
  5. >>> 

The above describes the entire process of installing Python.

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.