gpt4 book ai didi

python - Numpy Pandas 安装失败,沙盒违规 on/dev/null

转载 作者:太空宇宙 更新时间:2023-11-04 03:54:55 25 4
gpt4 key购买 nike

我正在尝试通过 requirements.txt 将 numpy 和 pandas 安装到 Jenkins 服务器。但是,它在文件中的以下两行失败。

numpy>=1.6.1
pandas==0.12.0

输出为:

setuptools.sandbox.SandboxViolation: SandboxViolation: open('/dev/null', 'w') {}

The package setup script has attempted to modify files on your system

that are not within the EasyInstall build area, and has been aborted.

我已经尝试手动安装 numpy 和 pandas,但是安装忽略了它们已经满足并尝试再次失败。

这里是更多的控制台输出:http://pastebin.com/gNScq75P

谁能看出是什么原因造成的?非常感谢

最佳答案

供以后引用的解决方案:

安装失败的原因是通过 pip install requirements.txt 从一个 requirements.txt 安装了 numpy 和 pandas。这失败了,显然忽略了 numpy 和 pandas 的顺序。先手动安装 numpy,然后再安装 pandas 解决了这个问题。

easy_install numpy
easy_install pandas

pip install numpy
pip install pandas

或者,可以创建两个 requirements.txt 文件,第一个包含 numpy,第二个包含 pandas,然后通过以下方式安装它们:

pip install requirements_one.txt
pip install requirements_two.txt

关于python - Numpy Pandas 安装失败,沙盒违规 on/dev/null,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19221360/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com