Skip to content

pipenv install/graph fail with 2018.10.9: ImportError: No module named weakref #2961

Closed

Description

@greyli

Issue description

With pipenv 2018.10.9, all the pipenv commands fail (including pipenv --support):

Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\pipenv.exe\__main__.py", line 5, in <module>
  File "c:\python27\lib\site-packages\pipenv\__init__.py", line 23, in <module>
    from .cli import cli
  File "c:\python27\lib\site-packages\pipenv\cli\__init__.py", line 3, in <module>
    from .command import cli
  File "c:\python27\lib\site-packages\pipenv\cli\command.py", line 18, in <module>
    from .. import environments
  File "c:\python27\lib\site-packages\pipenv\environments.py", line 4, in <module>
    from .vendor.vistir.misc import fs_str
  File "c:\python27\lib\site-packages\pipenv\vendor\vistir\__init__.py", line 4, in <module>
    from .compat import NamedTemporaryFile, TemporaryDirectory, partialmethod
  File "c:\python27\lib\site-packages\pipenv\vendor\vistir\compat.py", line 34, in <module>
    from .backports.tempfile import NamedTemporaryFile
  File "c:\python27\lib\site-packages\pipenv\vendor\vistir\backports\__init__.py", line 5, in <module>
    from .tempfile import NamedTemporaryFile
  File "c:\python27\lib\site-packages\pipenv\vendor\vistir\backports\tempfile.py", line 16, in <module>
    from backports.weakref import finalize
ImportError: No module named weakref

Enviroment

  • pip version: 10.0.1 and 18.1
  • Python version: 2.7
  • OS: Windows

Activity

  1. immerrr commented on Oct 9, 2018

    @immerrr
    Contributor

    FTR, this means backports.weakref module should be added to Py2 dependencies.

  2. svenpanne commented on Oct 9, 2018

    @svenpanne

    This looks quite similar to #2950. @immerrr: What exactly should be added where?

  3. immerrr commented on Oct 9, 2018

    @immerrr
    Contributor

    @svenpanne to fix this you can run pip install backports.weakref manually, or wait until #2962 is cleaned up and accepted.

  4. added a commit that references this issue on Oct 9, 2018
    160cb13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions