根据this随机字符串可以生成导入rstr模块。
import rstr
rstr.rstr('ABC')
但是当我编译时会发出以下错误?
ImportError: No module named rstr
我正在使用python 3.3。可能是什么原因?
答案 0 :(得分:4)
您需要下载该模块,然后确保您的python脚本可以找到它。
答案 1 :(得分:1)
现在,应该可以在PyPI上使用rstr包。您可以通过运行pip install rstr
如果您需要更多帮助,可以选择information about using pip here.