[Nix-dev] Cannot import scipy
Bjørn Forsman
bjorn.forsman at gmail.com
Sat Dec 6 17:09:39 CET 2014
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
More information about the nix-dev
mailing list