Skip to main content
 首页 » 编程设计

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

2024年11月01日9落叶无声

我正在尝试通过 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