No module named 'openpyxl' - Python 3.4 - Ubuntu

前端 未结 7 967
心在旅途
心在旅途 2020-12-16 08:57

I installed openpyxl with

$ pip install openpyxl

when I try the command

from openpyxl import Workbook
<         


        
7条回答
  •  Happy的楠姐
    2020-12-16 09:48

    If you're using Python3, then install:

    python3 -m pip install --user xlsxwriter
    

    This will run pip with the appropriate version of Python3. If you run bare pip3 and have many versions of Python install, it will still fail leading to more confusion.

    The --user flag will allow to install as a regular user and no require root.

提交回复
热议问题