我使用Lubuntu 14.04作为客户操作系统(使用VMplayer)。我想安装python3.4.3。我从这里下载了.tar.xz文件: https://www.python.org/downloads/
然后我提取文件并按照自述文件中的说明进行操作:
./configure
make
make test
我跑的时候
make test
它返回了这个:
359 tests OK.
3 tests failed:
test_urllib test_urllib2 test_urllib2net
3 tests altered the execution environment:
test___all__ test_site test_warnings
25 tests skipped:
test_bz2 test_curses test_dbm_gnu test_dbm_ndbm test_devpoll
test_gdb test_gzip test_idle test_kqueue test_lzma test_msilib
test_ossaudiodev test_readline test_smtpnet test_sqlite test_ssl
test_startfile test_tcl test_tk test_ttk_guionly test_ttk_textonly
test_winreg test_winsound test_zipfile64 test_zlib
Re-running failed tests in verbose mode
Re-running test 'test_urllib' in verbose mode
test test_urllib crashed -- Traceback (most recent call last):
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/test/regrtest.py", line 1271, in runtest_inner
the_module = importlib.import_module(abstest)
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/test/test_urllib.py", line 13, in <module>
import ssl
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/ssl.py", line 97, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: No module named '_ssl'
Re-running test 'test_urllib2' in verbose mode
test test_urllib2 crashed -- Traceback (most recent call last):
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/test/regrtest.py", line 1271, in runtest_inner
the_module = importlib.import_module(abstest)
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/test/test_urllib2.py", line 3, in <module>
from test import test_urllib
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/test/test_urllib.py", line 13, in <module>
import ssl
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/ssl.py", line 97, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: No module named '_ssl'
Re-running test 'test_urllib2net' in verbose mode
test test_urllib2net crashed -- Traceback (most recent call last):
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/test/regrtest.py", line 1271, in runtest_inner
the_module = importlib.import_module(abstest)
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/importlib/__init__.py", line 109, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
File "<frozen importlib._bootstrap>", line 1129, in _exec
File "<frozen importlib._bootstrap>", line 1471, in exec_module
File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/test/test_urllib2net.py", line 3, in <module>
from test.test_urllib2 import sanepathname2url
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/test/test_urllib2.py", line 3, in <module>
from test import test_urllib
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/test/test_urllib.py", line 13, in <module>
import ssl
File "/home/ayman/Downloads/python3.4.3/Python-3.4.3/Lib/ssl.py", line 97, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: No module named '_ssl'
make: *** [test] Error 1
我不确定在安装Python3.4.3之后,从长远来看这些失败/跳过的测试对我有什么影响:
sudo make install
我应该担心这些失败/跳过测试吗?如果有,是否有任何关于如何解决这些问题的想法?
答案 0 :(得分:1)
您似乎在没有ssl或zlib支持的情况下编译Python。这就是为什么有些测试失败而有些测试被跳过的原因。
您可以查看How to compile Python 2.4.6 with ssl, readline and zlib on Debian Lenny和No module named zlib found。