A user is trying to install Enthought's ETS projects on a Gentoo system and getting the following error message. I'm not seeing it on my systems, but then I'm not running Gentoo. Can anyone give me a clue as to what might be happening or how to go about determining what is happening? The error message has me really confused since 'temp/tmpTTJH2x/zZe82A' doesn't really give me much to go on as to what is being attempted outside of the sandbox. It doesn't help that one line makes it clear something is going on with a tmp directory for enthought.traits but then after that is the error about a tmp dir for enthought.tvtk. How'd we get back to enthought.tvtk in the middle of the enthought.traits install? -- Dave PS: 'enthought.traits' is one of the install_requires dependencies of 'enthought.tvtk' so easy_install probably just chained to building and installing it after enthought.tvtk, right? PPS: I do believe other users have reported the same issues on other systems but we've never quite figured out what the cause is. IIRC, telling them to manually download the source tarball and do a 'python setup.py install' seems to work just fine.
Processing enthought.traits-2.0.1b1.tar.gz Running enthought.traits-2.0.1b1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Edu8TK/enthought.traits-2.0.1b1/egg-dist-tmp-IIITHW error: Setup script exited with error: SandboxViolation: open('/tmp/easy_install-WZrKOz/enthought.tvtk-2.0.0b2/temp/tmpTTJH2x/zZe82A ', 131266, 384) {}
The package setup script has attempted to modify files on your system that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not support alternate installation locations even if you run its setup script by hand. Please inform the package's author and the EasyInstall maintainers to find out if a fix or workaround is available.
At 02:15 PM 12/6/2007 -0600, Dave Peterson wrote:
PPS: I do believe other users have reported the same issues on other systems but we've never quite figured out what the cause is. IIRC, telling them to manually download the source tarball and do a 'python setup.py install' seems to work just fine.
Processing enthought.traits-2.0.1b1.tar.gz Running enthought.traits-2.0.1b1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Edu8TK/enthought.traits-2.0.1b1/egg-dist-tmp-IIITHW error: Setup script exited with error: SandboxViolation: open('/tmp/easy_install-WZrKOz/enthought.tvtk-2.0.0b2/temp/tmpTTJH2x/zZe82A ', 131266, 384) {}
This looks like a bug that was fixed about a year ago: the sandboxing for os.open() (which is what the above appears to be calling) wouldn't allow you to write files *anywhere*, even if it was under a safe directory location. That would explain why you don't get the problem, but the user does. Check their setuptools version, using: python -c "from pkg_resources import require; print require('setuptools')" The bug was fixed in 0.6c5, so anything older will have this problem with anything that uses os.open() to write files.
Phillip J. Eby wrote:
At 02:15 PM 12/6/2007 -0600, Dave Peterson wrote:
PPS: I do believe other users have reported the same issues on other systems but we've never quite figured out what the cause is. IIRC, telling them to manually download the source tarball and do a 'python setup.py install' seems to work just fine.
Processing enthought.traits-2.0.1b1.tar.gz Running enthought.traits-2.0.1b1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Edu8TK/enthought.traits-2.0.1b1/egg-dist-tmp-IIITHW error: Setup script exited with error: SandboxViolation:
open('/tmp/easy_install-WZrKOz/enthought.tvtk-2.0.0b2/temp/tmpTTJH2x/zZe82A
', 131266, 384) {}
This looks like a bug that was fixed about a year ago: the sandboxing for os.open() (which is what the above appears to be calling) wouldn't allow you to write files *anywhere*, even if it was under a safe directory location.
That would explain why you don't get the problem, but the user does. Check their setuptools version, using:
python -c "from pkg_resources import require; print require('setuptools')"
The bug was fixed in 0.6c5, so anything older will have this problem with anything that uses os.open() to write files.
Thanks! -- Dave
Dave Peterson wrote:
Phillip J. Eby wrote:
At 02:15 PM 12/6/2007 -0600, Dave Peterson wrote:
PPS: I do believe other users have reported the same issues on other systems but we've never quite figured out what the cause is. IIRC, telling them to manually download the source tarball and do a 'python setup.py install' seems to work just fine.
Processing enthought.traits-2.0.1b1.tar.gz Running enthought.traits-2.0.1b1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Edu8TK/enthought.traits-2.0.1b1/egg-dist-tmp-IIITHW error: Setup script exited with error: SandboxViolation:
open('/tmp/easy_install-WZrKOz/enthought.tvtk-2.0.0b2/temp/tmpTTJH2x/zZe82A
', 131266, 384) {}
This looks like a bug that was fixed about a year ago: the sandboxing for os.open() (which is what the above appears to be calling) wouldn't allow you to write files *anywhere*, even if it was under a safe directory location.
That would explain why you don't get the problem, but the user does. Check their setuptools version, using:
python -c "from pkg_resources import require; print require('setuptools')"
The bug was fixed in 0.6c5, so anything older will have this problem with anything that uses os.open() to write files.
Thanks!
Well, turns out I was premature on assuming this fixed the problem. The user was originally using 0.6c3 but has since upgraded. Here's the current output from your request as sent back by the user: In [3]: pkg_resources.require("setuptools") Out[3]: [setuptools 0.6c7 (/usr/lib/python2.4/site-packages)] The original user is still reproducibly getting the following error -- it appears to have moved to a different project, but otherwise seems the same to me. In addition, one of our internal developers said he was getting this on one of his machines earlier as well but he was able to work around it by manually building the project in question and then going back to using easy_install to install the rest of the dependencies of the originally requested project. Most of us here are not seeing this error so I'm thinking it isn't something obviously wrong with the setup.py. You can look at the setup.py at : https://svn.enthought.com/enthought/browser/tags/enthought.interpolate_2.0.0... Note that this project does use numpy.distutils' setup function. Perhaps the error has something to do with that? Does anyone have any tips on how to go about debugging what might be wrong? In particular, is there any way to get an idea of what the particular file being opened actually represents? -- Dave
Searching for enthought.interpolate Reading http://code.enthought.com/enstaller/eggs/source Best match: enthought.interpolate 2.0.0b3 Downloading http://code.enthought.com/enstaller/eggs/source/enthought.interpolate-2.0.0 b3.tar.gz Processing enthought.interpolate-2.0.0b3.tar.gz Running enthought.interpolate-2.0.0b3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-jA35_C/enthought.interpolate-2.0.0b3/egg-dist-tmp-m08e-2 error: Setup script exited with error: SandboxViolation: open('/home/hans/.python24_compiled/dummy_TuxOnStage_5383_gODMbl', 131266, 384) {}
The package setup script has attempted [...]
At 10:53 AM 12/7/2007 -0600, Dave Peterson wrote:
Does anyone have any tips on how to go about debugging what might be wrong? In particular, is there any way to get an idea of what the particular file being opened actually represents?
set DISTUTILS_DEBUG=yes and run it; the error should give you a traceback then, which will tell you more about who's creating the file and why.
Dave Peterson wrote:
Most of us here are not seeing this error so I'm thinking it isn't something obviously wrong with the setup.py. You can look at the setup.py at :
https://svn.enthought.com/enthought/browser/tags/enthought.interpolate_2.0.0...
Note that this project does use numpy.distutils' setup function. Perhaps the error has something to do with that?
enthought.interpolate uses weave to built its extension module. weave uses ~/.python24_compiled as its location for the temporaries. We need to fix weave to not do this, or rewrite the extension not to use weave. The latter is probably best. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Robert Kern wrote:
Dave Peterson wrote:
Most of us here are not seeing this error so I'm thinking it isn't something obviously wrong with the setup.py. You can look at the setup.py at :
https://svn.enthought.com/enthought/browser/tags/enthought.interpolate_2.0.0...
Note that this project does use numpy.distutils' setup function. Perhaps the error has something to do with that?
enthought.interpolate uses weave to built its extension module. weave uses ~/.python24_compiled as its location for the temporaries. We need to fix weave to not do this, or rewrite the extension not to use weave. The latter is probably best.
I'm probably just being slow here, but how come the build of enthought.interpolate works for some (I'll assert most here) people but not others? -- Dave
Dave Peterson wrote:
Robert Kern wrote:
Dave Peterson wrote:
Most of us here are not seeing this error so I'm thinking it isn't something obviously wrong with the setup.py. You can look at the setup.py at :
https://svn.enthought.com/enthought/browser/tags/enthought.interpolate_2.0.0...
Note that this project does use numpy.distutils' setup function. Perhaps the error has something to do with that?
enthought.interpolate uses weave to built its extension module. weave uses ~/.python24_compiled as its location for the temporaries. We need to fix weave to not do this, or rewrite the extension not to use weave. The latter is probably best.
I'm probably just being slow here, but how come the build of enthought.interpolate works for some (I'll assert most here) people but not others?
I don't believe it has ever worked for anyone from easy_install. The sandbox is only active during the easy_install command, not when just running bdist_egg. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
participants (3)
-
Dave Peterson
-
Phillip J. Eby
-
Robert Kern