首页 > 解决方案 > test_ssl.py 和 test_urllib2.py 测试在 python2.7 中失败

问题描述

test_ssl.py

root@yasir:/home/yasir/PYTHON/python2.7-2.7.6/Lib/test# python  python test_ssl.py 
Traceback (most recent call last):
    File "test_ssl.py", line 7, in <module>
      from test.script_helper import assert_python_ok
ImportError: No module named script_helper

test_urllib2.py

root@yasir:/home/yasir/PYTHON/python2.7-2.7.6/Lib/test# python test_urllib2.py 
Traceback (most recent call last):
   File "test_urllib2.py", line 3, in <module>
     from test import test_urllib
ImportError: cannot import name test_urllib

我无法理解缺少哪个模块,因此面临此错误

标签: pythonpython-3.xpython-2.7

解决方案


由于缺少 python 模块 libpython2.7-testsuite 测试失败


推荐阅读