Linux test_venv未能通过Python 3.6.1安装

Linux test_venv未能通过Python 3.6.1安装,linux,python-3.x,pip,Linux,Python 3.x,Pip,我刚刚安装了LinuxMint18.1(所以我是Linux新手,不知道自己在做什么!),我正在尝试安装Python3.6.1。 然而,其中一个安装测试一直失败——test\u venv。 这是日志: running build running build_ext INFO: Can't locate Tcl/Tk libs and/or headers warning: building with the bundled copy of libffi is deprecated on this

我刚刚安装了LinuxMint18.1(所以我是Linux新手,不知道自己在做什么!),我正在尝试安装Python3.6.1。 然而,其中一个安装测试一直失败——test\u venv。 这是日志:

running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers
warning: building with the bundled copy of libffi is deprecated on this platform.  It will not be distributed with Python 3.7

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_bz2                  _curses               _curses_panel      
_dbm                  _gdbm                 _lzma              
_sqlite3              _ssl                  _tkinter           
readline              zlib                                     
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

The following modules found by detect_modules() in setup.py, have been
built by the Makefile instead, as configured by the Setup files:
atexit                pwd                   time               
running build_scripts
copying and adjusting /opt/Python-3.6.1/Tools/scripts/pydoc3 -> build/scripts-3.6
copying and adjusting /opt/Python-3.6.1/Tools/scripts/idle3 -> build/scripts-3.6
copying and adjusting /opt/Python-3.6.1/Tools/scripts/2to3 -> build/scripts-3.6
copying and adjusting /opt/Python-3.6.1/Tools/scripts/pyvenv -> build/scripts-3.6
changing mode of build/scripts-3.6/pydoc3 from 644 to 755
changing mode of build/scripts-3.6/idle3 from 644 to 755
changing mode of build/scripts-3.6/2to3 from 644 to 755
changing mode of build/scripts-3.6/pyvenv from 644 to 755
renaming build/scripts-3.6/pydoc3 to build/scripts-3.6/pydoc3.6
renaming build/scripts-3.6/idle3 to build/scripts-3.6/idle3.6
renaming build/scripts-3.6/2to3 to build/scripts-3.6/2to3-3.6
renaming build/scripts-3.6/pyvenv to build/scripts-3.6/pyvenv-3.6
./python  ./Tools/scripts/run_tests.py -v test_venv
/opt/Python-3.6.1/python -W default -bb -E -W error::BytesWarning -m test -r -w -j 0 -u all,-largefile,-audio,-gui -v test_venv
== CPython 3.6.1 (default, Apr 16 2017, 09:33:09) [GCC 5.4.0 20160609]
==   Linux-4.4.0-53-generic-i686-athlon-with-debian-stretch-sid little-endian
==   hash algorithm: siphash24 32bit
==  cwd: /opt/Python-3.6.1/build/test_python_21688
==  encodings: locale=UTF-8, FS=utf-8
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, verbose=0, bytes_warning=2, quiet=0, hash_randomization=1, isolated=0)
Using random seed 8896684
Run tests in parallel using 4 child processes
0:00:03 [1/1/1] test_venv failed
test_defaults (test.test_venv.BasicTest) ... ok
test_executable (test.test_venv.BasicTest) ... ok
test_executable_symlinks (test.test_venv.BasicTest) ... ok
test_isolation (test.test_venv.BasicTest) ... ok
test_overwrite_existing (test.test_venv.BasicTest) ... ok
test_prefixes (test.test_venv.BasicTest) ... ok
test_prompt (test.test_venv.BasicTest) ... ok
test_symlinking (test.test_venv.BasicTest) ... ok
test_unoverwritable_fails (test.test_venv.BasicTest) ... ok
test_upgrade (test.test_venv.BasicTest) ... ok
test_devnull (test.test_venv.EnsurePipTest) ... ok
test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok
test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok
test_with_pip (test.test_venv.EnsurePipTest) ... FAIL

======================================================================
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/Python-3.6.1/Lib/test/test_venv.py", line 368, in do_test_with_pip
    with_pip=True)
  File "/opt/Python-3.6.1/Lib/test/test_venv.py", line 61, in run_with_capture
    func(*args, **kwargs)
subprocess.CalledProcessError: Command '['/tmp/tmp75p27d_d/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/Python-3.6.1/Lib/test/test_venv.py", line 428, in test_with_pip
    self.do_test_with_pip(False)
  File "/opt/Python-3.6.1/Lib/test/test_venv.py", line 374, in do_test_with_pip
    self.fail(msg.format(exc, details))
AssertionError: Command '['/tmp/tmp75p27d_d/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

**Subprocess Output**
Traceback (most recent call last):
  File "/opt/Python-3.6.1/Lib/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/Python-3.6.1/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/Python-3.6.1/Lib/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/opt/Python-3.6.1/Lib/ensurepip/__init__.py", line 189, in _main
    default_pip=args.default_pip,
  File "/opt/Python-3.6.1/Lib/ensurepip/__init__.py", line 102, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/opt/Python-3.6.1/Lib/ensurepip/__init__.py", line 27, in _run_pip
    import pip
zipimport.ZipImportError: can't decompress data; zlib not available


----------------------------------------------------------------------
Ran 14 tests in 2.668s

FAILED (failures=1)
test test_venv failed

1 test failed:
    test_venv
Re-running failed tests in verbose mode
Re-running test 'test_venv' in verbose mode
test_defaults (test.test_venv.BasicTest) ... ok
test_executable (test.test_venv.BasicTest) ... ok
test_executable_symlinks (test.test_venv.BasicTest) ... ok
test_isolation (test.test_venv.BasicTest) ... ok
test_overwrite_existing (test.test_venv.BasicTest) ... ok
test_prefixes (test.test_venv.BasicTest) ... ok
test_prompt (test.test_venv.BasicTest) ... ok
test_symlinking (test.test_venv.BasicTest) ... ok
test_unoverwritable_fails (test.test_venv.BasicTest) ... ok
test_upgrade (test.test_venv.BasicTest) ... ok
test_devnull (test.test_venv.EnsurePipTest) ... ok
test_explicit_no_pip (test.test_venv.EnsurePipTest) ... ok
test_no_pip_by_default (test.test_venv.EnsurePipTest) ... ok
test_with_pip (test.test_venv.EnsurePipTest) ... FAIL

======================================================================
FAIL: test_with_pip (test.test_venv.EnsurePipTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/Python-3.6.1/Lib/test/test_venv.py", line 368, in do_test_with_pip
    with_pip=True)
  File "/opt/Python-3.6.1/Lib/test/test_venv.py", line 61, in run_with_capture
    func(*args, **kwargs)
subprocess.CalledProcessError: Command '['/tmp/tmp0zy9q1i8/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/Python-3.6.1/Lib/test/test_venv.py", line 428, in test_with_pip
    self.do_test_with_pip(False)
  File "/opt/Python-3.6.1/Lib/test/test_venv.py", line 374, in do_test_with_pip
    self.fail(msg.format(exc, details))
AssertionError: Command '['/tmp/tmp0zy9q1i8/bin/python', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.

**Subprocess Output**
Traceback (most recent call last):
  File "/opt/Python-3.6.1/Lib/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/opt/Python-3.6.1/Lib/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/opt/Python-3.6.1/Lib/ensurepip/__main__.py", line 4, in <module>
    ensurepip._main()
  File "/opt/Python-3.6.1/Lib/ensurepip/__init__.py", line 189, in _main
    default_pip=args.default_pip,
  File "/opt/Python-3.6.1/Lib/ensurepip/__init__.py", line 102, in bootstrap
    _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/opt/Python-3.6.1/Lib/ensurepip/__init__.py", line 27, in _run_pip
    import pip
zipimport.ZipImportError: can't decompress data; zlib not available


----------------------------------------------------------------------
Ran 14 tests in 2.652s

FAILED (failures=1)
test test_venv failed
1 test failed again:
    test_venv

Total duration: 6 sec
Tests result: FAILURE
Makefile:1018: recipe for target 'test' failed
make: *** [test] Error 1
运行构建
运行build_ext
信息:找不到Tcl/Tk库和/或头
警告:此平台上不推荐使用libffi捆绑副本进行构建。它不会与Python3.7一起发布
Python构建成功完成!
未找到构建这些可选模块所需的位:
_bz2_curses_curses_面板
_dbm_gdbm_lzma
_sqlite3\u ssl\u tkinter
读线zlib
要查找必要的位,请在detect_modules()中的setup.py中查找模块名称。
以下由setup.py中的detect_modules()找到的模块已被删除
而是由Makefile生成,如安装文件所配置:
atexit pwd时间
运行build\u脚本
复制和调整/opt/Python-3.6.1/Tools/scripts/pydoc3->build/scripts-3.6
复制和调整/opt/Python-3.6.1/Tools/scripts/idle3->build/scripts-3.6
复制和调整/opt/Python-3.6.1/Tools/scripts/2to3->build/scripts-3.6
复制和调整/opt/Python-3.6.1/Tools/scripts/pyvenv->build/scripts-3.6
将build/scripts-3.6/pydoc3的模式从644更改为755
将build/scripts-3.6/idle3的模式从644更改为755
将build/scripts-3.6/2to3的模式从644更改为755
将build/scripts-3.6/pyvenv的模式从644更改为755
将build/scripts-3.6/pydoc3重命名为build/scripts-3.6/pydoc3.6
将build/scripts-3.6/idle3重命名为build/scripts-3.6/idle3.6
将build/scripts-3.6/2to3重命名为build/scripts-3.6/2to3-3.6
将build/scripts-3.6/pyvenv重命名为build/scripts-3.6/pyvenv-3.6
./python./Tools/scripts/run_tests.py-v test_venv
/opt/Python-3.6.1/Python-W default-bb-E-W error::byteswawning-m test-r-W-j 0-u all,-大文件,-音频,-gui-v test\v
==CPython 3.6.1(默认,2017年4月16日09:33:09)[GCC 5.4.0 20160609]
==Linux-4.4.0-53-generic-i686-athlon-with-debian-stretch-sid-little-endian
==哈希算法:siphash24 32位
==cwd:/opt/Python-3.6.1/build/test_Python_21688
==编码:区域设置=UTF-8,FS=UTF-8
使用标志进行测试:sys.flags(调试=0,检查=0,交互=0,优化=0,不写字节码=0,无用户站点=0,无站点=0,忽略环境=1,详细=0,字节警告=2,安静=0,散列随机化=1,隔离=0)
使用随机种子8896684
使用4个子进程并行运行测试
0:00:03[1/1/1]测试失败
测试默认值(test.test\v.BasicTest)。。。好啊
测试可执行文件(test.test\v.BasicTest)。。。好啊
测试可执行的符号链接(test.test\venv.BasicTest)。。。好啊
测试隔离(测试、测试基本测试)。。。好啊
测试覆盖现有测试(test.test\venv.BasicTest)。。。好啊
测试前缀(test.test\v.BasicTest)。。。好啊
测试提示(test.test\venv.BasicTest)。。。好啊
测试符号连接(测试、测试、基本测试)。。。好啊
测试不可写失败(test.test\venv.BasicTest)。。。好啊
测试升级(测试、测试、基本测试)。。。好啊
测试(测试、测试、确认测试)。。。好啊
测试明确无pip(测试、测试、确认测试)。。。好啊
默认情况下测试(test.test.venv.EnsurePipTest)。。。好啊
使用pip进行测试(测试、测试、确认测试)。。。失败
======================================================================
失败:使用pip进行测试(测试、测试和确认测试)
----------------------------------------------------------------------
回溯(最近一次呼叫最后一次):
文件“/opt/Python-3.6.1/Lib/test/test\u venv.py”,第368行,在dou-test\u中,带有\u-pip
带_pip=True)
文件“/opt/Python-3.6.1/Lib/test/test\u venv.py”,第61行,运行时使用
func(*args,**kwargs)
subprocess.CalledProcessError:命令'['/tmp/tmp75p27d_d/bin/python','-Im','ensurepip','--upgrade','--default pip']'返回非零退出状态1。
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“/opt/Python-3.6.1/Lib/test/test_venv.py”,第428行,在测试_中带有_pip
self.do_测试_与_pip(假)
文件“/opt/Python-3.6.1/Lib/test/test_venv.py”,第374行,在dou-test_中,带有_-pip
self.fail(消息格式(exc,详细信息))
断言错误:命令“[”/tmp/tmp75p27d_d/bin/python'、“-Im”、“ensurepip'、“--upgrade'、“--default pip']”返回非零退出状态1。
**子进程输出**
回溯(最近一次呼叫最后一次):
文件“/opt/Python-3.6.1/Lib/runpy.py”,第193行,在运行模块中
“\uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu
文件“/opt/Python-3.6.1/Lib/runpy.py”,第85行,在运行代码中
exec(代码、运行\全局)
文件“/opt/Python-3.6.1/Lib/ensurepip/_main__uuu.py”,第4行,在
确保安装在主管道上
文件“/opt/Python-3.6.1/Lib/ensurepip/_init__.py”,第189行,在_main中
default\u pip=args.default\u pip,
文件“/opt/Python-3.6.1/Lib/ensurepip/_init__.py”,第102行,在引导程序中
_运行\u pip(args+[p[0]用于\u项目中的p],其他\u路径)
文件“/opt/Python-3.6.1/Lib/ensurepip/_init__.py”,第27行,在运行pip中
进口pip
zipimport.ZipImportError:无法解压缩数据;zlib不可用
----------------------------------------------------------------------
在2.668秒内运行了14次测试
失败(失败=1)
测试失败
1测试失败:
测试
在详细模式下重新运行失败的测试
在详细模式下重新运行测试“test\u venv”
测试默认值(test.test\v.BasicTest)。。。好啊
测试可执行文件(test.test\v.BasicTest)。。。好啊
测试可执行的符号链接(test.test\venv.BasicTest)。。。好啊
测试隔离(测试、测试基本测试)。。。好啊
测试覆盖现有测试(test.test\venv.BasicTest)。。。好啊
测试前缀(test.test\v.BasicTest)。。。好啊
测试提示(test.test\venv.BasicTest)。。。好啊
测试符号连接(测试、测试、基本测试)。。。好啊
测试不可写失败(test.test\venv.BasicTest)。。。好啊
测试单元升级(t)