# python **Repository Path**: zhanglibin/python ## Basic Information - **Project Name**: python - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-04-25 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # python ## python3安装 1. 链接 [3.7tgz](https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz) [3.7tar.xz](https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tar.xz) 2. 解压 解压tar.xz xz -d *.tar.xz tar xvf *.tar 3. 解压tgz zxvf *.tgz 4. 安装 ``` ./configure make make install ``` ## python3.7以上,安装会报错 ``` ModuleNotFoundError: No module named '_ctypes' ``` 1. 需要安装一个插件 ``` #yum install libffi-devel -y #make install重新编译python3 ``` ## 2019的4月25号,爬虫爬官网数据,爬出来的数据是乱码,一看字符编码是gbk。然后这个样子就可以了 ``` rep = requests.get('http://www.huatu.com, verify = False) rep.encoding = 'GBk' print(rep.text) ``` ## json ``` rep = rep.text rep = json.loads(rep,strict = False) code = rep['code'] ```