Hello nix community,
I’m currently expericing an issue, where I’m unable to run a python app with opencv-python
to capture a picture on a webcam.
Initially I was experiencing a different kind of issue with this message:
Original error was: libstdc++.so.6: cannot open shared object file: No such file or directory
So to address this issue I decided to create a shell, add stdenv.cc.cc.lib and use FHS:
{ pkgs ? import <nixpkgs> {} }:
(pkgs.buildFHSUserEnv {
name = "pipzone";
targetPkgs = pkgs: (with pkgs; [
python311
poetry
zsh
opencv4
mesa
libGL
libGLU
xorg.libX11
glib
glibc
stdenv.cc.cc.lib
]);
runScript = "zsh";
}).env
and then I got stuck up to this point.
I’m aware of the wrapper wrapQtAppsHook, I have already tried to use it in several different settings:
- by adding
libsForQt5.qt5.wrapQtAppsHook
package to thetargetPkgs
list in buildFHSUserEnv - by adding
*wrapQtAppsHook**
tonativeBuildInputs
- by creating
derivation.nix
file from Projects using python (e.g. PyQt5) and importing it to my shell
I just can’t make it work!
I have also tried following the several threads for the same type of issue, but unfortunatelly none of them have worked for me.
Any help will be much appriciated!