安装Python简单操作方法分享

开发 后端
安装Python的整个过程操作起来比较简单,但是需要等待比较长的时间。我们将会在这里通过图文的方式来为大家详细介绍相关应用方法。

如果我们想要在freebsd中进行一个Python的安装操作的话,应该如何做才能实现一个比较简单的操作方法呢?首先我们就在这里先为大家介绍了其中一个应用比较简单的安装Python的方法。

先su到root帐户

进入/usr/ports/lang/Python26

然后直接make

安装Python操作步骤一 

安装Python步骤之二 

安装Python步骤之三 

安装Python整个过程如图所示,经过漫长的编译之后...

然后make install

又是漫长的等待...

出现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# 

恭喜,安装Python成功

然后输入hwt# Python

进入如下Python开发环境

  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. >>>  

输入print 'hello money'

出现

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

恭喜,第一个Python程序出来了

不需要第三个变量来交换两个输入值

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

以上就是对安装Python的整个过程的介绍。

【编辑推荐】

  1. Python Helloworld程序简单实现
  2. Python Class正确应用代码示例剖析
  3. 调用Python脚本基本应用方式简述
  4. Python同步队列正确应用方式解析
  5. Python线程同步在实际应用中功能体现
责任编辑:曹凯 来源: 博客园
相关推荐

2010-02-01 09:40:08

Python操作

2010-08-25 14:37:38

snort入侵检测

2010-03-05 13:48:24

Python for

2010-01-21 15:56:31

VB.NET文本框

2010-03-04 14:32:24

Python自动下载文

2010-03-15 15:18:23

Python运行

2009-12-15 13:59:42

Ruby对象操作

2010-02-23 17:59:52

WSIT连接WCF

2009-12-30 14:28:06

Silverlight

2010-03-05 10:36:52

Python调用zip

2010-03-11 09:56:57

Python字符串操作

2009-12-31 11:35:20

Silverlight

2009-09-18 10:58:31

C#数组操作

2009-08-18 15:49:19

C# 操作Excel

2010-01-28 16:14:33

Android安装卸载

2010-03-05 15:27:06

Python文件路径

2009-12-30 15:53:28

Silverlight

2011-03-29 10:16:47

Jave枚举

2009-12-28 17:48:01

WPF界面布局

2010-01-28 14:01:32

Android监听通话
点赞
收藏

51CTO技术栈公众号