python - 在 NixOS 中,如何解决冲突?

标签 python nix nixpkgs

我正在尝试使用 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'

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

最佳答案

msgpack-python 已重命名为 msgpack 但这两个包都存在于 Nixpkgs 的 release-18.09 中。这似乎是fixedmaster 上,这些修复应该反向移植到 18.09。确实存在针对此类问题的解决方法:

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

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

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

I have created an issue

关于python - 在 NixOS 中,如何解决冲突?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52941074/

相关文章:

python - 多个范围的并集

nixos - 在我的存储库中实现覆盖

qt - 如何在 qt 库中使用调试符号为 qt 5.5 创建开发 shell

python - 列出 : printing number only if its not a duplicate

python - 如何干净地关闭 PyQt 应用程序

haskell - 使用 nix 构建简单的 haskell 库

c - 如何使用 Nix 在 macOS 上构建使用 time.h 的软件

nix - 从 Nix 模块选项部分引用 pkgs.system 时无限递归

python - 将列表列表转换为嵌套字典

haskell - 如何在 nix 中从 haskell 包(使用 stack/cabal)构建可执行文件?