FrancescoVe FrancescoVe - 5 months ago 35
Python Question

No module named 'openpyxl' - Python 3.4 - Ubuntu

I installed


$ pip install openpyxl

when I try the command

from openpyxl import Workbook

I get

Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from openpyxl import Workbook
ImportError: No module named 'openpyxl'

I am using Python 3.4 and Ubuntu 14.04, 32-bit OS type


@zetysz and @Manish already fixed the problem. I am just putting this in an answer for future reference:

  • pip refers to Python 2 as a default in Ubuntu, this means that pip install x will install the module for Python 2 and not for 3

  • pip3 refers to Python 3, it will install the module for Python 3