We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I would like to have python bindings accessible to Python 2 and Python3 at the same time.
I can make the bindings work in Python 2 and Python 3 individually, but not at the same time.
expression:
with import <nixpkgs> {}; stdenv.mkDerivation rec { name = "env"; env = buildEnv { name = name; paths = buildInputs; }; buildInputs = [ python27 python27Packages.opencv3 python36 python36Packages.opencv3 ]; }
then run
$ nix-shell [nix-shell:~/env]$ python2 -c "import cv2" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named cv2 [nix-shell:~/env]$ python3 -c "import cv2" [nix-shell:~/env]$
Please run nix-shell -p nix-info --run "nix-info -m" and paste the results.
nix-shell -p nix-info --run "nix-info -m"
$ nix-shell -p nix-info --run "nix-info -m" - system: `"x86_64-linux"` - host os: `Linux 4.15.0-32-generic, Ubuntu, 16.04.5 LTS (Xenial Xerus)` - multi-user?: `no` - sandbox: `no` - version: `nix-env (Nix) 2.0.4` - channels(user): `"nixpkgs-18.09pre147772.d1ae60cbad7"` - nixpkgs: `/home/user/.nix-defexpr/channels/nixpkgs`
The text was updated successfully, but these errors were encountered:
Just as the manual tells you, you sould always use python.withPackages.
python.withPackages
Sorry, something went wrong.
No branches or pull requests
Issue description
I would like to have python bindings accessible to Python 2 and Python3 at the same time.
I can make the bindings work in Python 2 and Python 3 individually, but not at the same time.
Steps to reproduce
expression:
then run
Technical details
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste theresults.
The text was updated successfully, but these errors were encountered: