[Nix-dev] Cannot import scipy

Domen Kožar domen at dev.si
Sun Dec 7 12:44:50 CET 2014


$ nix-shell -p pythonPackages.scipy

Should be enough for getting shell envorinment with python available and
$PYTHONPATH set.

Note: you should be using latest unstable for newest changes to take an
effect.

On Sat, Dec 6, 2014 at 5:09 PM, Bjørn Forsman <bjorn.forsman at gmail.com>
wrote:

> On 6 December 2014 at 16:18, Tom Dimiduk <tom at dimiduk.net> wrote:
> > I am running nixos-unstable, and having trouble getting scipy to import.
> >
> > I attempted to follow the instructions on the nixos python wiki page:
> > https://nixos.org/wiki/Python
> >
> > and have an entry in my config.nix:
> >
> >     myScipyEnv = pkgs.myEnvFun {
> >       name = "scipy";
> >       buildInputs = with pkgs.python27Packages; [
> >         scipy
> >       ];
> >     };
> >
> > Then I did:
> >
> > nix-env -i env-scipy
> >
> > But importing scipy fails with:
> >
> > ImportError: No module named scipy
> >
> > Is this the correct way to use scipy? This route has worked for me
> > with other python packages.
>
> In addition to what Luca says, you can also use nix-shell:
>
>   $ nix-shell -p python pythonPackages.scipy
>
> After that you can do this:
>
> [nix-shell:~]$ python
> Python 2.7.8 (default, Jan 01 1970, 00:00:01)
> [GCC 4.8.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import scipy
> >>> scipy.__version__
> '0.14.0'
> >>>
>
> Best regards,
> Bjørn Forsman
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141207/bba727f6/attachment.html 


More information about the nix-dev mailing list