首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Linux上安装Python3.5.1时发出消息“测试test_gdb失败”

在Linux上安装Python3.5.1时发出消息“测试test_gdb失败”
EN

Stack Overflow用户
提问于 2015-12-09 17:35:40
回答 1查看 1.4K关注 0票数 1

在Linuxubuntu14.04LTS上安装Python-3.5.1时,运行命令后:

代码语言:javascript
复制
make test

我收到一条消息:

代码语言:javascript
复制
test test_gdb failed

我用命令做了一个测试:

代码语言:javascript
复制
./python -m test -v test_gdp

我得到了这个:

代码语言:javascript
复制
== CPython 3.5.1 (default, Dec 10 2015, 00:27:11) [GCC 4.8.4]
==   Linux-3.19.0-25-generic-i686-athlon-with-debian-jessie-sid little-endian
==   hash algorithm: siphash24 32bit
==   /Desktop/Python-3.5.1/build/test_python_11095
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=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1, isolated=0)
[1/1] test_gdp
test test_gdp crashed -- Traceback (most recent call last):
  File "/Desktop/Python-3.5.1/Lib/test/regrtest.py", line 1292, in runtest_inner
the_module = importlib.import_module(abstest)
  File "/Desktop/Python-3.5.1/Lib/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'test.test_gdp'

1 test failed:
    test_gdp

我已经安装了gdp。

怎么修呢?或者我能无视它吗?

EN

回答 1

Stack Overflow用户

发布于 2020-06-23 06:26:27

我试图在我的系统上安装Python3.8.3。

我的系统正在运行gdb版本:

代码语言:javascript
复制
~/Downloads/Python-3.8.3$ gdb --version
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".

我的Ubuntu版本是Ubuntu 18.04.4 LTS

一个简单的upgradegdb为我修复了

gdb版本:

代码语言:javascript
复制
$ gdb -v
GNU gdb (Ubuntu 8.2-0ubuntu1~18.04) 8.2
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

然后运行make test导致成功

代码语言:javascript
复制
~/Downloads/Python-3.8.3$ make test
 CC='gcc -pthread' LDSHARED='gcc -pthread -shared    ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall'  _TCLTK_INCLUDES='' _TCLTK_LIBS=''   ./python -E ./setup.py  build
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers

Python build finished successfully!
The necessary bits to build these optional modules were not found:
_dbm                  _lzma                 _tkinter           
_uuid                                                          
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:
_abc                  atexit                pwd                
time                                                           

running build_scripts
copying and adjusting /home/qbuser/Downloads/Python-3.8.3/Tools/scripts/pydoc3 -> build/scripts-3.8
copying and adjusting /home/qbuser/Downloads/Python-3.8.3/Tools/scripts/idle3 -> build/scripts-3.8
copying and adjusting /home/qbuser/Downloads/Python-3.8.3/Tools/scripts/2to3 -> build/scripts-3.8
changing mode of build/scripts-3.8/pydoc3 from 644 to 755
changing mode of build/scripts-3.8/idle3 from 644 to 755
changing mode of build/scripts-3.8/2to3 from 644 to 755
renaming build/scripts-3.8/pydoc3 to build/scripts-3.8/pydoc3.8
renaming build/scripts-3.8/idle3 to build/scripts-3.8/idle3.8
renaming build/scripts-3.8/2to3 to build/scripts-3.8/2to3-3.8
./python  ./Tools/scripts/run_tests.py 
/home/qbuser/Downloads/Python-3.8.3/python -u -W default -bb -E -m test -r -w -j 0 -u all,-largefile,-audio,-gui
== CPython 3.8.3 (default, Jun 18 2020, 21:02:16) [GCC 7.5.0]
== Linux-5.3.0-53-generic-x86_64-with-glibc2.27 little-endian
== cwd: /home/qbuser/Downloads/Python-3.8.3/build/test_python_15689
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Using random seed 8229413
0:00:00 load avg: 0.39 Run tests in parallel using 10 child processes
0:00:00 load avg: 0.39 [  1/423] test_bool passed
0:00:00 load avg: 0.39 [  2/423] test_osx_env passed
.
.
.
.
0:02:25 load avg: 4.58 [420/423] test_tokenize passed (35.3 sec) -- running: test_multiprocessing_forkserver (40.5 sec), test_multiprocessing_spawn (1 min 5 sec), test_concurrent_futures (42.0 sec)
0:02:55 load avg: 3.21 running: test_multiprocessing_forkserver (1 min 10 sec), test_multiprocessing_spawn (1 min 35 sec), test_concurrent_futures (1 min 12 sec)
0:02:56 load avg: 3.21 [421/423] test_multiprocessing_spawn passed (1 min 36 sec) -- running: test_multiprocessing_forkserver (1 min 11 sec), test_concurrent_futures (1 min 12 sec)
0:02:57 load avg: 3.21 [422/423] test_multiprocessing_forkserver passed (1 min 11 sec) -- running: test_concurrent_futures (1 min 13 sec)
0:03:27 load avg: 2.08 running: test_concurrent_futures (1 min 43 sec)
0:03:57 load avg: 1.32 running: test_concurrent_futures (2 min 13 sec)
0:04:05 load avg: 1.34 [423/423] test_concurrent_futures passed (2 min 21 sec)

== Tests result: SUCCESS ==

404 tests OK.

19 tests skipped:
    test_dbm_ndbm test_devpoll test_idle test_ioctl test_kqueue
    test_lzma test_msilib test_ossaudiodev test_startfile test_tcl
    test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle
    test_winconsoleio test_winreg test_winsound test_zipfile64

Total duration: 4 min 5 sec
Tests result: SUCCESS
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34185329

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档