我现在无法在项目中导入`命令`

问题描述 投票:0回答:2

在我的项目中,我想导入命令,所以我将波纹管代码放在我的项目中:

import commands

但是我得到错误:

No module named commands less... (⌘F1) 
This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items.
python
2个回答
1
投票

从文档:

自2.6版本后不推荐使用:已在Python 3中删除了命令模块。请改用子进程模块。

你可以点这个链接:https://docs.python.org/2/library/commands.html


0
投票

commands模块已在python3中删除,你可以检查there

自2.6版本后不推荐使用:已在Python 3中删除了命令模块。请改用子进程模块。

© www.soinside.com 2019 - 2024. All rights reserved.