Skip to content
New issue

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

pythonPackages.basemap: Python interpreter cannot import basemap #24621

Closed
knedlsepp opened this issue Apr 4, 2017 · 1 comment
Closed

pythonPackages.basemap: Python interpreter cannot import basemap #24621

knedlsepp opened this issue Apr 4, 2017 · 1 comment

Comments

@knedlsepp
Copy link
Member

knedlsepp commented Apr 4, 2017

Issue description

I'm trying to run a nix-shell with several python packages. One of them is basemap.
I cannot successfully import basemap however.
Oddly enough it works when using ipython as REPL.

Steps to reproduce

nix-shell -p pythonPackages.basemap  --pure --run "python -c 'import mpl_toolkits.basemap'"

outputs: ImportError: No module named basemap

However if we use ipython it works:

nix-shell -p pythonPackages.basemap pythonPackages.ipython --pure --run "ipython -c 'import mpl_toolkits.basemap'"

Technical details

  • System: openSUSE13
  • Nix version: 1.11.6
  • Nixpkgs version: "17.09pre104446.09c91f5"
@knedlsepp knedlsepp changed the title basemap: Python interpreter cannot import basemap pythonPackages.basemap: Python interpreter cannot import basemap Apr 4, 2017
@FRidh
Copy link
Member

FRidh commented Apr 5, 2017

That's a funny one. The following does function:

nix-shell -p 'python.withPackages(ps: with ps; [basemap])'  --pure --run "python -c 'import mpl_toolkits.basemap'"

Also, when I fix the expression to build a wheel like we normally do I can import it as well. Seems like that's the proper fix :)

@FRidh FRidh self-assigned this Apr 30, 2017
@FRidh FRidh closed this as completed in dce7ebb Apr 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants