在使用pip安装pymongo的过程中报错,提示如下: $ pip3 install pymongo pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting pymongo Could not fetch URL https://pypi.python.org/simple/pymongo/: There was a p…
1.下载安装包 https://www.python.org/ftp/python/ 该目录下选择所需要的版本进行下载.解压. wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz .tgz 2.二进制文件安装 1.创建存放目录 mkdir /usr/local/python3 2.运行脚本configure config是一个shell脚本,根据平台的特性生成Makefile文件,为下一步的编译做准备. 可以通过在 conf…
# 背景 安装pip后发现执行pip install pytest,提示下面错误 pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. # 解决方法 查询了资料,大概意思是,新版的pip默认要使用SSL,可以通过设置修改,但木有发现pip.conf文件在哪里,囧rz,后续再研究下 但找到另外一个解决方法 先安装openssl-dev,然后重…
pip install 时报错: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. 解决办法: For Windows 10 if you want use pip in normal cmd, not only in Anaconda prompt. you need add 3 environment paths. like the…
Python更新pip出现错误解决方法 更新pip python -m pip install --upgrade pip 查看时报错 解决方法 在命令栏(即win+r)输入:easy_install pip 即可解决 添加公众号:…
新手在学习python时候,会遇到很多的坑,下面来具体说说其中一个. 在使用python编写面向对象的程序时,新手可能遇到TypeError: this constructor takes no arguments这个错误. 例如下面的程序: class Ball: def _init_(self,color,size,direction): self.color=color self.size=size self.direction=direction def bounce(self): if…
折腾Python做快速Web开发.最后定下来用Flask,相对教程全面. utf8编码上遇到问题,所有文件已经是utf8编码保存,加载css.js等静态文件,如果用GBK编码就正常:用utf8就报UnicodeDecodeError 错误. import sys reload(sys) sys.setdefaultencoding('utf8') 终于找到完美解决办法: 解决 Python UnicodeDecodeError…
最近使用python3.5,其中遇到安装中的错误,现在记录下来,提个醒 1 安装setuptools 出现缺少 zlib模块 解决: 1 yum install zlib 2 yum install zlib-devel 然后重新编译安装python 2 为了使用tab补全命令安装 readline出现错误: gcc: error: readline/libreadline.a: No such file or directory 解决: 1 yum install readline-devel…
python读文件经常会出现 UnicodeDecodeError: 'gbk' codec can't decode byte 0xbd in position 764: illegal multibyte sequence 解决方法: 以"rb",方式读再以一定的方式解码,如"UTF-8","UTF-16", "gbk" with open(log_path, 'rb') as fd: lines = [l.decode(…
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.Collecting requests Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: Can't conne…