云数据库 RDS-安装Python 3.9.9:验证安装是否成功

时间:2023-12-18 10:59:37

验证安装是否成功

  1. 验证安装,重点验证SSL功能。

    [root@ecs-ad4d Python-3.9.9]# python

    Python 3.9.9 (main, Nov 25 2021, 12:36:32)

    [GCC 8.4.1 20200928 (Red Hat 8.4.1-1)] on linux

    Type "help", "copyright", "credits" or "license" for more information.

    import ssl

    import urllib.request

    context = ssl._create_unverified_context()

    urllib.request.urlopen('https://www.example.com/',context=context).read()

  2. 如果有返回,说明安装成功。执行命令退出。

    quit()

support.huaweicloud.com/bestpractice-rds/rds_pg_0035.html