zoukankan      html  css  js  c++  java
  • python 3.x 安装问题及连接oracle数据库

    最近有用到python去处理一些问题,发现现在3已出来,遂用直接下3.7使用

    发现问题还是有一点的

    1. pip 会出现ssl问题

    Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host=
    'files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/bf
    /5f/b574ac9f70811df0540e403309f349a8b9fa1a25d3653824c32e52cc1f28/mysql-0.0.2.tar
    .gz (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FA
    ILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:
    1051)')))
    

     解决方法:pip --trusted-host pypi.python.org --trusted-host pypi.org install --trusted-host files.pythonhosted.org cx_Oracle

    2. 连接数据库(oracle)时问题

      2.1 安装对应位数据且与数据库对应版本的客户端:instantclient_11_2

      2.2 将里面的oci.dll   oraocci11.dll   oraociei11.dll 三个文件复制到时 Python37Libsite-packages 目录下

      2.3 安装cx_Oracle:pip --trusted-host pypi.python.org --trusted-host pypi.org install --trusted-host files.pythonhosted.org cx_Oracle

  • 相关阅读:
    JAVA 打开文件乱码
    单引号和双引号的区别
    global和$GLOBALS[]的区别
    php统计数组元素个数
    PHP5.3x不再支持ereg和eregi
    discuz论坛diy标签
    网页特效过渡功能
    discuz缓存机制
    php数组中删除元素
    speedphp是个不错的框架
  • 原文地址:https://www.cnblogs.com/lobin/p/10179576.html
Copyright © 2011-2022 走看看