python
辛勤汗水@
17年毕业于黑龙江大学,自学运维知识,走上运维的道路,目前在无人驾驶公司担任运维工程师,感谢大家的支持,与大家共同进步
展开
-
Python报错TypeError: unsupported operand type(s) for -=: ‘Retry‘ and ‘int‘
Python报错TypeError: unsupported operand type(s) for -=: ‘Retry’ and ‘int’新搭建的Ubuntu16.04系统,执行pip install oss2 paho-mqtt requests,报错:Python报错TypeError: unsupported operand type(s) for -=: ‘Retry’ and ‘int’解决办法:创建pip.conf文件夹mkdir ~/.pip添加pip国内源 cat原创 2021-04-13 14:23:19 · 888 阅读 · 0 评论 -
执行python脚本报错:AttributeError: ‘module‘ object has no attribute ‘SSL_ST_INIT‘
执行python脚本报错:AttributeError: ‘module’ object has no attribute ‘SSL_ST_INIT’执行python脚本报错: 执行python脚本报错:AttributeError: ‘module’ object has no attribute ‘SSL_ST_INIT’解决方法:sudo rm -rf /usr/lib/python2.7/dist-packages/OpenSSLsudo rm -rf /usr/lib/python2.7/原创 2021-03-08 18:35:02 · 354 阅读 · 0 评论 -
执行pip报错:sys.stderr.write(f“ERROR: {exc}“)
执行pip报错:sys.stderr.write(f"ERROR: {exc}")在刚刚装好的系统里面执行pip命令报错如下解决办法:sudo rm -rf /usr/lib/python2.7/dist-packages/OpenSSLsudo rm -rf /usr/lib/python2.7/dist-packages/pyOpenSSL-0.15.1.egg-infosudo pip install pyopenssl...原创 2021-03-08 18:23:48 · 982 阅读 · 0 评论 -
Python连接redis集群方法
Python连接redis集群方法1. 安装redis、rediscluster模块pip install redispip install redis-py-cluster2. 示例代码# -*- coding: UTF-8 -*-from rediscluster import RedisCluster#构建所有的节点startup_nodes = [ {"host": "192.168.2.50", "port": 6379}, # 主 {"host": "192原创 2020-11-26 11:23:09 · 1828 阅读 · 0 评论 -
解决Connection to pypi.org timed out问题
解决Connection to pypi.org timed out问题pip install pymysql 报下面问题WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by‘ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnect原创 2020-08-07 18:30:09 · 12751 阅读 · 7 评论