Linux下 python import pdb出现无cmd属性

```Python 3.6.7 |Anaconda, Inc.| (default, Oct 23 2018, 19:16:44) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/miniconda/envs/py36/lib/python3.6/site-packages/tensorflow/__init__.py", line 28, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/miniconda/envs/py36/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 63, in <module>
    from tensorflow.python.framework.framework_lib import *  # pylint: disable=redefined-builtin
  File "/miniconda/envs/py36/lib/python3.6/site-packages/tensorflow/python/framework/framework_lib.py", line 25, in <module>
    from tensorflow.python.framework.ops import Graph
  File "/miniconda/envs/py36/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 54, in <module>
    from tensorflow.python.platform import app
  File "/miniconda/envs/py36/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 23, in <module>
    from absl.app import run as _run
  File "/miniconda/envs/py36/lib/python3.6/site-packages/absl/app.py", line 35, in <module>
    import pdb
  File "/miniconda/envs/py36/lib/python3.6/pdb.py", line 136, in <module>
    class Pdb(bdb.Bdb, cmd.Cmd):
AttributeError: module 'cmd' has no attribute 'Cmd'

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问