尝试将passlib导入python3,但失败:

$ pip freeze | grep lib
passlib==1.6.5

$ python3
Python 3.4.2 (default, Oct  8 2014, 10:45:20)

>>> import passlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'passlib'

最佳答案

pip将为python 2安装库如果还想为python 3安装它,则必须单独安装:

$ python3 -m pip install passlib

10-08 08:10