6-01 5,229 views
CentOS 6.6自带的是Python 2.6.6,而编译llvm需要Python 2.7以上。
checking for python... /usr/bin/python
checking for python >= 2.7... not found
configure: error: found python 2.6.6 (/usr/bin/python); required >= 2.7
yum中最新的也是Python 2...
5-30 3,193 views
CentOS 6.6自带的是Python 2.6.6,而编译llvm需要Python 2.7以上。
checking for python... /usr/bin/python
checking for python >= 2.7... not found
...
添加环境变量主要是在/etc/profile中
例如,在/usr/local/下安装了python2.7
因为系统默认是2.4,所以
#python
Python 2.4.3 (#1, Sep
3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type “help”, “copyright”, ...
5-30 3,552 views
添加环境变量主要是在/etc/profile中
例如,在/usr/local/下安装了python2.7
因为系统默认是2.4,所以
#python
Python 2.4.3 (#1, Sep
3 2009, 15:37:37)
[G...
当在php中使用mb_detect_encoding函数进行编码识别时,很多人都碰到过识别编码有误的问题,例如对与GB2312和UTF- 8,或者UTF-8和GBK(这里主要是对于cp936的判断),网上说是由于字符短是,mb_detect_encoding会出现误判。
例如:
代码如下:
$encode = mb_detect_enco...
5-28 2,845 views
当在php中使用mb_detect_encoding函数进行编码识别时,很多人都碰到过识别编码有误的问题,例如对与GB2312和UTF- 8,或者UTF-8和GBK(这里主要是对于cp936的判...
# -*- coding:utf-8 -*-
background_image_filename = 'sushiplate.jpg'
sprite_image_filename = 'fugu.png'
import pygame
from pygame.locals import *
from sys import exit
pygame.init()
screen = pygame.display.set_mode((640, 480), 0, 32)
background ...
5-27 3,410 views
# -*- coding:utf-8 -*-
background_image_filename = 'sushiplate.jpg'
sprite_image_filename = 'fugu.png'
import pygame
from pygame.locals import *
f...
你是否有這樣的煩腦,用Python寫了一個很酷的程式,傳給你同學看卻因為他沒有裝Python直譯器,為了執行你這個小程式,他得安裝直譯器才能執行,更麻煩的還有第三方的模組要安裝,意願就大大的降低,同樣的,面對你的客戶,你總不能要求你的客戶安裝Python直譯器,然...
5-27 5,732 views
你是否有這樣的煩腦,用Python寫了一個很酷的程式,傳給你同學看卻因為他沒有裝Python直譯器,為了執行你這個小程式,他得安裝直譯器才能執行,更麻煩的還有...
在网上苦苦搜索了许多方法都安装不了pygame,总是提示一些插件not found 。终于发现了如何安装pygame了,现把我的经验分享给大家。
1. 首先你的电脑要有 pip 插件,详情查看pip安装详解
2. CMD 执行命令 ~ pip install wheel
cmd ~ pip list , 出现 wheel ...
5-26 15,968 views
在网上苦苦搜索了许多方法都安装不了pygame,总是提示一些插件not found 。终于发现了如何安装pygame了,现把我的经验分享给大家。
1. 首先你的电脑要有 ...
"list
#!/usr/bin/env python
#- *- coding:utf-8 -*-
#列表
classmates = ['pitter','backer','blue']
print classmates
print len(classmates)
print classmates[0]
print classmates[:]#全部打印
print classmates[1:2]
print classmates[::-1]#倒着打...
5-26 3,064 views
"list
#!/usr/bin/env python
#- *- coding:utf-8 -*-
#列表
classmates = ['pitter','backer','blue']
print classmates
print len(classmates)
p...