Search code examples
pythonpython-3.xpippasslib

Can't import passlib into python3


Trying to import passlib into python3 and it fails:

$ 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'

Solution

  • pip will install a library for python 2. If you want to install it for python 3 too, you must do so separately:

    $ python3 -m pip install passlib