简体   繁体   中英

Import Openpyxl on Python 2 or Python 3

I have the following codes running fine in Python 3. But I got an error of "no module named openpyxl" when i run in Python 2.

import openpyxl
from openpyxl import Workbook

I did try "pip install openpyxl", and "!pip install openpyxl" in Python 2 in Bluemix but still not working. Any advice? Thank you so much!!!!!!

在我的Linux Mint(Rafaela)安装中,使用python 2.7和python 3.5,我必须使用“pip3 install”加载到python 3中。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM