首页 > 编程语言 > 详细

执行Python文件遇到的问题 pip install 或者 curl 执行下载 安装命令时,出现ssl 安全通道错误.

时间:2019-12-27 19:43:54      阅读:307      评论:0      收藏:0      [点我收藏+]

 

1. pip install  error

  单次解决:  pip install --upgrade pip --trusted-host pypi.org --trusted-host files.pythonhosted.org

  永久解决  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12


参考资料:

https://stackoverflow.com/questions/41618766/powershell-invoke-webrequest-fails-with-ssl-tls-secure-channel

2. Open()打开文件. 文件格式

   

 with open(key.txt, encoding=utf-8, mode = r) as f:
        for line in f:
            line=line.strip(\n).replace(\ufeff,‘‘)
            //xxxxx

 

3. Visual Studio Code Tab键盘冲突

将以下内容添加到keybindings.json :

{"key": "tab", "command": "-acceptSelectedSuggestion", "when": "editorTextFocus && suggestWidgetVisible"},    
{"key": "tab", "command": "acceptSelectedSuggestion", "when": "editorTextFocus && suggestWidgetVisible && !inSnippetMode" },    

第一行禁用现有规则,第二行重新启用它,除非您处于片段模式。

执行Python文件遇到的问题 pip install 或者 curl 执行下载 安装命令时,出现ssl 安全通道错误.

原文:https://www.cnblogs.com/mailaidedt/p/12109140.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!