Nixpkgs: `python37Packages.pip2nix` doesn't work properly

Created on 27 Dec 2019  路  3Comments  路  Source: NixOS/nixpkgs

Describe the bug
I have installed the package python37Packages.pip2nix. When I try to use pip2nix, it does not work as expected, and throws an error.

To Reproduce
Steps to reproduce the behavior:

  1. Install python37Packages.pip2nix
  2. Run pip2nix generate wfuzz

Expected behavior
The program should not crash.

Additional context
The error:

位 pip2nix generate wfuzz                                                                                                                                                                             ~/tmp/pyp
Traceback (most recent call last):
  File "/nix/store/q19vsfmd6wdp089076dh19m4q3r5nmm3-python3.7-pip2nix-0.7.0/bin/.pip2nix-wrapped", line 11, in <module>
    sys.exit(cli())
  File "/nix/store/5xr7mcmiiqxcyd6c2540i8dyxvjrhxc0-python3.7-click-7.0/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/nix/store/5xr7mcmiiqxcyd6c2540i8dyxvjrhxc0-python3.7-click-7.0/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/nix/store/5xr7mcmiiqxcyd6c2540i8dyxvjrhxc0-python3.7-click-7.0/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/nix/store/5xr7mcmiiqxcyd6c2540i8dyxvjrhxc0-python3.7-click-7.0/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/nix/store/5xr7mcmiiqxcyd6c2540i8dyxvjrhxc0-python3.7-click-7.0/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/nix/store/q19vsfmd6wdp089076dh19m4q3r5nmm3-python3.7-pip2nix-0.7.0/lib/python3.7/site-packages/pip2nix/cli.py", line 70, in generate
    from pip2nix.main import main
  File "/nix/store/q19vsfmd6wdp089076dh19m4q3r5nmm3-python3.7-pip2nix-0.7.0/lib/python3.7/site-packages/pip2nix/main.py", line 9, in <module>
    from .generate import NixFreezeCommand
  File "/nix/store/q19vsfmd6wdp089076dh19m4q3r5nmm3-python3.7-pip2nix-0.7.0/lib/python3.7/site-packages/pip2nix/generate.py", line 12, in <module>
    from pip import cmdoptions
ImportError: cannot import name 'cmdoptions' from 'pip' (/nix/store/mi4khdvzgabzg170an0rjc61cw02sr2f-python3.7-pip-19.2.3/lib/python3.7/site-packages/pip/__init__.py)

Metadata

 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.88, NixOS, 19.09.1548.3a1861fcabc (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
bug stale python

Most helpful comment

There is fork, that appears to be maintained. Maybe we want to switch the nixpkgs derivation to use that?

All 3 comments

In pip 18 or 19 or so that module was moved to _internal. pip2nix needs to be fixed and updated. Until then that package is broken.

There is fork, that appears to be maintained. Maybe we want to switch the nixpkgs derivation to use that?

I marked this as stale due to inactivity. → More info

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tomberek picture tomberek  路  3Comments

lverns picture lverns  路  3Comments

edolstra picture edolstra  路  3Comments

retrry picture retrry  路  3Comments

langston-barrett picture langston-barrett  路  3Comments