4

我正在尝试使用 Python 建立开发环境,包括 Python 库 Spacy 和 Pandas。我试图运行的命令是nix-shell -p 'python36.withPackages(ps: with ps; [ spacy pandas ])'

但这就是发生的事情:

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'

这里发生了什么,我该如何解决?

4

1 回答 1

5

msgpack-python已重命名为msgpack但两个软件包都存在于release-18.09Nixpkgs 中。这似乎已得到修复master这些修复应该向后移植到 18.09。确实存在此类问题的解决方法:

(python36.withPackages(ps: with ps; [ spacy pandas ])).override (args: { ignoreCollisions = true; })

这实际上不是 NixOS 问题,而是 Nixpkgs 问题。

请注意,您只能安装单个环境,这是导致冲突错误的另一个常见原因。这不是这里的问题。

我创建了一个问题

于 2018-10-23T08:25:15.260 回答