ImportError:没有名为spwd的模块

2024-04-24 11:14:58 发布

您现在位置:Python中文网/ 问答频道 /正文

有人能帮忙吗?我不明白我为什么看到这个。在

我试图使用Python中的spwd模块。但我看到了意外的错误:

Traceback (most recent call last):
File "./library/system_users.py", line 25, in <module>
import spwd
ImportError: No module named pwd

我认为默认情况下应该是可用的。在

Python 2.7.10
pip8.1.1来自/Library/Python/2.7/site-packages(Python 2.7)
El Capitan苹果操作系统10.11.4

我知道有时候pip install --upgrade pip可以帮上忙。不幸的是,现在不行。在

谢谢你的预付款。在


Tags: 模块pippymost错误librarycallsystem
1条回答
网友
1楼 · 发布于 2024-04-24 11:14:58

您应该使用Anaconda。在

Anaconda is a completely free Python distribution (including for commercial use and redistribution). It includes more than 400 of the most popular Python packages for science, math, engineering, and data analysis. See the packages included with Anaconda and the Anaconda changelog.

之后,只需键入:

conda install spwd

相关问题 更多 >