I'm trying to set up a development environment with Python, including the Python libraries Spacy and Pandas. The command I'm trying to run is nix-shell -p 'python36.withPackages(ps: with ps; [ spacy pandas ])'
But this is what happens:
these derivations will be built:
/nix/store/7pgb52aa5hkgzv0mkc3jmxdhavxdr013-python3-3.6.6-env.drv
building '/nix/store/7pgb52aa5hkgzv0mkc3jmxdhavxdr013-python3-3.6.6-env.drv'...
collision between `/nix/store/k1njxvw8rdv29yz7iccr4nbfwcbghwhc-python3.6-msgpack-0.5.6/lib/python3.6/site-packages/msgpack/__pycache__/__init__.cpython-36.pyc' and `/nix/store/nig71x1wc7b3c04hs6vz8kk6bmdz5ldv-python3.6-msgpack-python-0.5.6/lib/python3.6/site-packages/msgpack/__pycache__/__init__.cpython-36.pyc'
What's happening here, and how can I fix it?
msgpack-python
was renamed to msgpack
but both packages exist in release-18.09
of Nixpkgs. This seems to have been fixed on master
and these fixes should be backported to 18.09. A workaround for this kind of problem does exist:
(python36.withPackages(ps: with ps; [ spacy pandas ])).override (args: { ignoreCollisions = true; })
This is not actually a NixOS problem, but a Nixpkgs problem.
Note that you can only install a single environment, which is another common cause of collision errors. This is not the problem here.