I installed openpyxl
with
$ 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
openpyxl package — openpyxl 3.0.
Openpyxl is a Python library that is used to read from an Excel file or write to an Excel file. Data scientists use Openpyxl for data analysis, data copying, data mining, drawing charts, styling sheets, adding formulas, and more. Workbook: A spreadsheet is represented as a workbook in openpyxl.
@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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With