Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
greyli opened this issue Oct 9, 2018 · 3 comments
Closed

Comments

@greyli
Copy link
Contributor

@greyli greyli commented Oct 9, 2018

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
@immerrr
Copy link
Contributor

@immerrr immerrr commented Oct 9, 2018

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

@svenpanne
Copy link

@svenpanne svenpanne commented Oct 9, 2018

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

@immerrr
Copy link
Contributor

@immerrr immerrr commented Oct 9, 2018

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

techalchemy added a commit that referenced this issue Oct 9, 2018
- Add tempfile patch and news
- Fixes #2950
- Fixes #2955
- Fixes #2961
- Closes #2967

Signed-off-by: Dan Ryan <dan@danryan.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants