Trouble Installing with Pip Command

Issue #1000 invalid
Alexander Cheung
created an issue

on macOS using pip install openpyxl

Traceback (most recent call last): File "", line 1, in <module> from openpyxl import load_workbook File "/usr/local/lib/python2.7/site-packages/openpyxl/", line 29, in <module> from openpyxl.workbook import Workbook File "/usr/local/lib/python2.7/site-packages/openpyxl/workbook/", line 5, in <module> from .workbook import Workbook File "/usr/local/lib/python2.7/site-packages/openpyxl/workbook/", line 7, in <module> from openpyxl.worksheet import Worksheet File "/usr/local/lib/python2.7/site-packages/openpyxl/worksheet/", line 4, in <module> from .worksheet import Worksheet File "/usr/local/lib/python2.7/site-packages/openpyxl/worksheet/", line 35, in <module> from openpyxl.cell import Cell File "/usr/local/lib/python2.7/site-packages/openpyxl/cell/", line 4, in <module> from .cell import Cell, WriteOnlyCell File "/usr/local/lib/python2.7/site-packages/openpyxl/cell/", line 15, in <module> from copy import copy File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 52, in <module> import weakref File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/", line 14, in <module> from _weakref import ( ImportError: cannot import name _remove_dead_weakref

Comments (1)

  1. CharlieC

    This must be something specific to your Python installation. NB. I would not recommend installing packages to the system Python.

    Fuchsia:temp charlieclark$ virtualenv-2.7 pp
    New python executable in /Users/charlieclark/temp/pp/bin/python
    Installing setuptools, pip, wheel...done.
    Fuchsia:temp charlieclark$ cd pp
    Fuchsia:pp charlieclark$ . bin/activate
    (pp) Fuchsia:pp charlieclark$ pip install openpyxl
    Collecting openpyxl
      Downloading openpyxl-2.5.1.tar.gz (169kB)
        100% |████████████████████████████████| 174kB 2.0MB/s
    Collecting jdcal (from openpyxl)
    Collecting et_xmlfile (from openpyxl)
    Building wheels for collected packages: openpyxl
      Running bdist_wheel for openpyxl ... done
      Stored in directory: /Users/charlieclark/Library/Caches/pip/wheels/98/5e/20/70cde417026f1e168acdac7babf47b204a7b752b1a8e6bb795
    Successfully built openpyxl
    Installing collected packages: jdcal, et-xmlfile, openpyxl
    Successfully installed et-xmlfile-1.0.1 jdcal-1.3 openpyxl-2.5.1
    (pp) Fuchsia:pp charlieclark$ python
    Python 2.7.14 (default, Sep 27 2017, 12:15:00)
    [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from openpyxl import load_workbook
  2. Log in to comment