【发布时间】:2016-09-20 00:18:53
【问题描述】:
我已经使用命令 pip install ujson 安装了 ujson
当我尝试运行我的 python 项目时,它会返回
ImportError: 没有名为 ujson 的模块
- 操作系统版本:Red Hat Enterprise Linux Server 7.2 版(迈坡)
- Python 版本:Python 2.7.6
- 点子列表:ujson (1.35)
有什么帮助吗?
【问题讨论】:
-
您的机器上是否有多个版本的python?例如2.7 和 3.5
-
不,我只有 python 2.7
-
@Joseph 我想我有 2 个 python 版本,2.6 和 2.7。我该怎么办?我得到同样的错误
-
常见问题,您在一个版本的 python 上安装了模块,但试图在另一个版本上运行它。确保您将模块安装在您希望在其上运行它的 python 版本上:-)
标签: python linux python-2.7 redhat ujson