编译安装完Python3之后,使用pip来安装python库,发现了如下报错: $ pip install numpy pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting numpy Retrying (Retry(total=4, connect=None, read=None, redirect=None
在Cent0S 7.5下将Python 2.7.5升级到Python 3.6.6后,发现ssl模块不可用,具体详细信息如下所示: [root@db-server ~]# pip list Package Version ---------- ------- pip 19.2.3 setuptools 39.0.1 WARNING: pip is configured with locations that require TLS/SSL, however the ssl mo
最近身边一些朋友发生在项目当中编写自己模块,导入的时候无法导入的问题. 下面我来分享一下关于python中导入模块的一些基本知识. 1 导入模块时寻找路径 在每一个运行的python程序当中,都维护了一套sys文件,在这里面的path变量里,存储了在当前程序中导入模块时候寻找的路径. 上代码看一下: import sys if __name__ == '__main__': file_path = sys.path for i in file_path: print(i) ''' 执行结果: D