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

    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('
    ').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" },    
    

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

  • 相关阅读:
    PHP类(一)-类的实例化
    PHP函数(六)-匿名函数(闭包函数)
    PHP函数(五)-回调函数
    javaIO-字符流
    split 命令
    hadoop的增删改查
    Hadoop的MR
    java的序列化和反序列化
    字符串格式化-String类format方法
    Avro从入门到入土
  • 原文地址:https://www.cnblogs.com/mailaidedt/p/12109140.html
Copyright © 2011-2022 走看看