pypi2nix icon indicating copy to clipboard operation
pypi2nix copied to clipboard

Error when running pypi2nix command

Open Fresheyeball opened this issue 5 years ago • 1 comments

Description

Not sure why this is happening yet. But the cli tool made making this issue very easy, which makes me think you might want to know about it.

INFO: pypi2nix v2.0.1 running ...
INFO: Downloading wheels and creating wheelhouse ...
INFO: Installing runtime requirements
ERROR: Could not find a version that satisfies the requirement opencv-python (from -r /tmp/tmpg_4riq5_/cc998a7d486d1ac774633ddee5779f29.txt (line 1)) (from versions: none)
ERROR: No matching distribution found for opencv-python (from -r /tmp/tmpg_4riq5_/cc998a7d486d1ac774633ddee5779f29.txt (line 1))
% pypi2nix --version
% pypi2nix -V python37 -e opencv-python

Fresheyeball avatar Dec 09 '19 00:12 Fresheyeball

Two things:

  1. opencv-python does not have a source distribution. You have three options here:
    1. Open an issue with the opencv-python and ask the maintainers to upload a source distribution
    2. Find the latest version of opencv-python which HAS a source distribution and use that. Let's say the latest source distribution is 1.2.3 then you would invoke pypi2nix like that: pypi2nix -e opencv-python==1.2.3.
    3. You try building from source (github repo). Invokation would be: pypi2nix -e 'git+https://github.com/skvark/opencv-python#egg=opencv-python'
  2. Building opencv yourself looks like going through a world of pain. Check out https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/opencv/4.x.nix Unfortunately pypi2nix will be of little assistance in the process. If you are successful though, let me know.

If you just want opencv-python to "just work" you could just use the version that is packaged with nixpkgs (which I recommend). But if you are eager to get this working with pypi2nix I could assist you. And if you have a lot of time on your hands we could collaborate to bring pypi2nix to a place where these thing are manageable for people other than hyper intelligent space wizards and witches.

seppeljordan avatar Dec 09 '19 19:12 seppeljordan