无法在命令行中运行python脚本-urllib3.util.ssl_

时间:2020-07-06 20:07:17

标签: python scheduled-tasks

当我在Pycharm中运行python脚本时,它可以完美运行。当我尝试通过命令行运行它时出现错误:

{
  "query": {
    "bool": {
      "must": {
        "query_string": {
          "query": "*",
          "default_operator": "AND"
        }
      },
      "filter": {
        "terms": {
          "organization_id": [
            "fred"
          ]
        }
      }
    }
  },
  "size": 50,
  "sort": {
    "updated": "desc"
  },
  "aggs": {
    "status": {
      "terms": {
        "size": 2147483647,
        "field": "status"
      }
    },
    "tags": {
      "terms": {
        "size": 2147483647,
        "field": "tags"
      }
    }
  }
}

1 个答案:

答案 0 :(得分:0)

您需要在命令行中激活环境。

例如:假设您的环境名称为conda_torch

conda activate conda_torch,那么激活的环境将可用。

然后您应该输入:python KD.py

enter image description here