Skip to content

Wheel python package unpack failed using fetchPypi #43468

@ghost

Description

Issue description

I am trying to build python36 interpreter with numpy package. And i want to fetch and install numpy as python wheel package. As far as I understand, fetchPypi provides ability to fetch wheel, but everything it does is the change of URL. Nevertheless unpacking stage happens as It would be a zip/tar archive.
Error while building:

trying https://files.pythonhosted.org/packages/cp36/n/numpy/numpy-1.13.1-cp36-cp36m-manylinux1_x86_64.whl
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 16.1M  100 16.1M    0     0  6337k      0  0:00:02  0:00:02 --:--:-- 9390k
building '/nix/store/g8lg6qdv56bb5z9q4wykfglk28a966xi-python3.6-numpy-1.13.1.drv'...
unpacking sources
unpacking source archive /nix/store/jij8z6r5bf0a5dwfw07v0rgmbhkgfl7k-numpy-1.13.1-cp36-cp36m-manylinux1_x86_64.whl
do not know how to unpack source archive /nix/store/jij8z6r5bf0a5dwfw07v0rgmbhkgfl7k-numpy-1.13.1-cp36-cp36m-manylinux1_x86_64.whl
builder for '/nix/store/g8lg6qdv56bb5z9q4wykfglk28a966xi-python3.6-numpy-1.13.1.drv' failed with exit code 1
cannot build derivation '/nix/store/6wc945dnw78lq2fp89p1v4j1fqbvyn5c-python3-3.6.5-env.drv': 1 dependencies couldn't be built
error: build of '/nix/store/6wc945dnw78lq2fp89p1v4j1fqbvyn5c-python3-3.6.5-env.drv' failed

Steps to reproduce

My default.nix:

 with import <nixpkgs> {};
 
 (let
   python = let
     packageOverrides = self: super: rec {
 
       numpy = super.numpy.overridePythonAttrs(old: rec {
         pname = "numpy";
         version = "1.13.1";
         src = super.fetchPypi {
            inherit pname version;
            format = "wheel";
            python = "cp36";
            abi = "cp36m";
            platform = "manylinux1_x86_64";
            sha256 = "d910a24f536f926bd56fb30d6f17ae8b89a1406e105087a49e014e000b00e8db";
         };
       });
     };
   in pkgs.python3.override {inherit packageOverrides;};
 
 in python.withPackages(ps: with ps; [
 numpy
 ])).env

Just run nix-shell in dir with default.nix;

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

  • system: "x86_64-linux"
  • host os: Linux 4.4.0-130-generic, Ubuntu, 16.04.4 LTS (Xenial Xerus)
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.0.4
  • channels(user): "nixpkgs-18.09pre144939.14a9ca27e69"
  • nixpkgs: /home/user/.nix-defexpr/channels/nixpkgs

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: questionRequests for a specific question to be answered6.topic: pythonPython is a high-level, general-purpose programming language.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions