2
推荐
1332
阅读

解决python中,中文注释编码报错

Python默认使用ASCII标准编码,如果没有其他编码提示,要定义一个源代码编码,下面的格式大家也都看到了,是 coding= encoding name后来我在 ‘test.py’ 中添加了一行 ‘# -*- coding: utf-8 -*-‘,之后就没有报错了。[root@hongxue_216 ~]# cat test.py #!/usr/bin/python # -*- coding:utf8 -*- # 这是注释 print "Hel...

发表了文章 • 2016-09-23 10:22 • 0 条评论

0
推荐
2479
阅读

How to set an HTTP proxy in Python 2.7? and install a plug example

richard@e7270:~$ export http_proxy=http://公司账户:密码@代理服务器地址:端口/richard@e7270:~$ export https_proxy=http://公司账户:密码@代理服务器地址:端口/richard@e7270:~$ sudo -E easy_install pipSearching for pipReading https://pypi.python.org/simple/pip/Best match: pip 8.1.2Downloading https://py...

发表了文章 • 2016-09-23 08:53 • 0 条评论

0
推荐
1486
阅读

初学者推荐阅读项目

作者:董伟明链接:https://www.zhihu.com/question/31830544/answer/122597712来源:知乎著作权归作者所有,转载请联系作者获得授权。初学者可以先阅读一些代码量比较少的,最好是单文件的项目:1. GitHub - kennethreitz/pip-pop: Tools for managing requirements files.2. GitHub - kennethreitz/envoy: Python Subp...

发表了文章 • 2016-09-20 14:32 • 0 条评论

0
推荐
1269
阅读

Python: AttributeError: 'module' object has no attribute 'HTTPSConnection'

To link custom built software with library you need to have C headers installed. In ubuntu they are in -dev packages (libname-dev).In your particular case you need to install libssl-dev (apt-get install libssl-dev) andIf you need SSL related functionality in standard library, then you s...

发表了文章 • 2016-08-15 11:05 • 0 条评论

0
推荐
1303
阅读

Python: python zlib module install 解决办法

The issueCertain important Python libraries require the zlib module. By default, Python2.6 does not include zlib as part of the standard library without some extra work.If you're on a relatively new Ubuntu version but still need to maintain backwards compatability with a Python2.6 program, shared...

发表了文章 • 2016-08-15 10:06 • 1 条评论

0
推荐
1301
阅读

升级Python从2.7.6到2.7.11

现在有最新版本了,2.7.12,由于兼容包的支持不一定都跟上了,所以推荐最佳的版本是current version的前一个版本。首先下载源tar包  自己去网上找  下载完成后到下载目录下,解压  进入解压缩后的文件夹cd Python-2.7.11  在编译前先在/usr/local建一个文件夹python2_7_11(作为python的安装路径,以免覆盖...

发表了文章 • 2016-08-14 15:14 • 0 条评论

0
推荐
1200
阅读

下载了python之后的编译安装

下载: https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tar.xzInstall Python 2 by running the following commands:./configure --prefix=/usr \ --enable-shared \ --with-system-expat \ --with-system-ffi \ --enable-unicod...

发表了文章 • 2016-08-05 15:00 • 0 条评论