折腾:
期间,需要去在Mac中,安装Python的第三方库openpyxl
openpyxl
Simple usage — openpyxl 2.4.7 documentation
openpyxl 2.4.7 : Python Package Index
A Python library to read/write Excel 2010 xlsx/xlsm files
openpyxl / openpyxl / source / — Bitbucket
Python操作Excel表格(openpyxl) – WTF Daily Blog
此处,确认了Mac中的Python是Python2:
➜ ~ python -V Python 2.7.10 |
此处,想要去用Python3,所以:
【已解决】Mac中如何安装Python3且和Python2共存
然后去用:
pip3 install openpyxl
安装库,且看看版本是多少:
➜ ~ pip3 install openpyxl Collecting openpyxl Downloading openpyxl-2.4.7.tar.gz (156kB) 100% |████████████████████████████████| 163kB 64kB/s Collecting jdcal (from openpyxl) Downloading jdcal-1.3.tar.gz Collecting et_xmlfile (from openpyxl) Downloading et_xmlfile-1.0.1.tar.gz Building wheels for collected packages: openpyxl, jdcal, et-xmlfile Running setup.py bdist_wheel for openpyxl … done Stored in directory: /Users/crifan/Library/Caches/pip/wheels/f5/c0/e2/7bd8f5f74f0c8ee97cd551409f8c8d8c388540248d32a28b99 Running setup.py bdist_wheel for jdcal … done Stored in directory: /Users/crifan/Library/Caches/pip/wheels/0f/63/92/19ac65ed64189de4d662f269d39dd08a887258842ad2f29549 Running setup.py bdist_wheel for et-xmlfile … done Stored in directory: /Users/crifan/Library/Caches/pip/wheels/99/f6/53/5e18f3ff4ce36c990fa90ebdf2b80cd9b44dc461f750a1a77c Successfully built openpyxl jdcal et-xmlfile Installing collected packages: jdcal, et-xmlfile, openpyxl Successfully installed et-xmlfile-1.0.1 jdcal-1.3 openpyxl-2.4.7 ➜ ~ python3 Python 3.6.1 (default, May 6 2017, 14:32:57) [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin Type “help”, “copyright”, “credits” or “license” for more information. >>> import openpyxl >>> openpyxl.__version__ ‘2.4.7’ >>> |
openpyxl的版本是2.4.7
转载请注明:在路上 » 【已解决】Mac中安装Python的第三方库:openpyxl