使用easy_install安装isbntools时出现SandboxViolation错误

时间:2022-08-11 15:47:51

Hi I have the similar problem like Problem solved here simplar but only with my package that is called isbntools. If I try to make

嗨我有类似的问题,像问题解决这里simplar但只有我的包名为isbntools。如果我试着做

  python setup.py install

in the dir from extracted isbntools I get error that it can not find some includes. Has anyone tried to make an easy_install on SUSE SLES13.1 ? Here the log:

在提取的isbntools的目录中,我得到错误,它找不到一些包含。有没有人试图在SUSE SLES13.1上进行easy_install?这里的日志:

     :~> sudo easy_install isbntools
     root's password:
     Searching for isbntools
     Reading https://pypi.python.org/simple/isbntools/
     Best match: isbntools 4.2.4
     Downloading https://pypi.python.org/packages/source/i/isbntools/isbntools-4.2.4.tar.gz#md5=3bee22a3b30d247ca51a5bfadfe5a42d
     Processing isbntools-4.2.4.tar.gz
     Writing /tmp/easy_install-g01nzx/isbntools-4.2.4/setup.cfg
     Running isbntools-4.2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-g01nzx/isbntools-4.2.4/egg-dist-tmp-3i8ma7
     error: Setup script exited with error: SandboxViolation: mkdir('/home/wschrabi/.isbntools', 511) {}

     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.

Add: I tried option 1) and got following errors:

添加:我尝试了选项1)并得到以下错误:

      si204alt:/home/wschrabi/__SAMBA/ISBN_PY # easy_install --user isbntools-4.2.4
      Processing isbntools-4.2.4
      Writing /home/wschrabi/samba/ISBN_PY/isbntools-4.2.4/setup.cfg
      Running setup.py -q bdist_egg --dist-dir /home/wschrabi/samba/ISBN_PY/isbntools-4.2.4/egg-dist-tmp-uHR4xe
      Traceback (most recent call last):
        File "/usr/local/bin/easy_install", line 9, in <module>
          load_entry_point('setuptools==16.0', 'console_scripts', 'easy_install')()
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 2243, in main
        File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
          dist.run_commands()
        File "/usr/lib64/python2.6/distutils/dist.py", line 975, in run_commands
          self.run_command(cmd)
        File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command
          cmd_obj.run()
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 380, in run
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 610, in easy_install
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 659, in install_item
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 842, in install_eggs
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1070, in build_and_install
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1056, in run_setup
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 240, in run_setup
        File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
          self.gen.throw(type, value, traceback)
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 193, in setup_context
        File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
          self.gen.throw(type, value, traceback)
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 164, in save_modules
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 139, in resume
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 152, in save_modules
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 193, in setup_context
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 237, in run_setup
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 267, in run
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 236, in runner
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 46, in _execfile
        File "/home/wschrabi/samba/ISBN_PY/isbntools-4.2.4/setup.py", line 59, in <module>
          CONFRES = pkg_resources.resource_filename('isbntools', CONFFILE)
        NameError: name 'pkg_resources' is not defined

and when I do option 4) - it does work but got sh errors.

当我做选项4) - 它确实有效,但有错误。

      wschrabi@si204alt:~/__SAMBA/ISBN_PY> ./isbn meta 9999999999 endnote
      sh: symbol lookup error: /lib64/libncurses.so.5: undefined symbol: _nc_outch_sp
      sh: symbol lookup error: /lib64/libncurses.so.5: undefined symbol: _nc_outch_sp
      sh: symbol lookup error: /lib64/libncurses.so.5: undefined symbol: _nc_outch_sp
      sh: symbol lookup error: /lib64/libncurses.so.5: undefined symbol: _nc_outch_sp
      %0 Book
      %T En bok om Albo härad och Albo härads hembygdsförening
      %A Nsa
      %@ 9999999999
      %D 2004
      %I Albo härads hembygdsförening
      wschrabi@si204alt:~/__SAMBA/ISBN_PY>

Moreover I re-installed the setup tools as described in No module named pkg_resources but got now on 2 diff SUSE PCs (!) the same MemoryError:

此外,我重新安装了没有名为pkg_resources的模块中描述的设置工具,但现在在2个diff SUSE PC(!)上获得了相同的MemoryError:

      lmschrabmair@si204:~> easy_install --user ISBN_PY/isbntools-4.2.4.tar.gz
      Processing isbntools-4.2.4.tar.gz
      Writing /tmp/easy_install-tB6gBa/isbntools-4.2.4/setup.cfg
      Running isbntools-4.2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tB6gBa/isbntools-4.2.4/egg-dist-tmp-2jiuVg
      Traceback (most recent call last):
        File "/usr/local/bin/easy_install", line 9, in <module>
          load_entry_point('setuptools==16.0', 'console_scripts', 'easy_install')()
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 2243, in main
        File "/usr/lib64/python2.6/distutils/core.py", line 152, in setup
          dist.run_commands()
        File "/usr/lib64/python2.6/distutils/dist.py", line 975, in run_commands
          self.run_command(cmd)
        File "/usr/lib64/python2.6/distutils/dist.py", line 995, in run_command
          cmd_obj.run()
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 380, in run
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 610, in easy_install
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 659, in install_item
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 842, in install_eggs
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1070, in build_and_install
        File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1056, in run_setup
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 240, in run_setup
        File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
          self.gen.throw(type, value, traceback)
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 193, in setup_context
        File "/usr/lib64/python2.6/contextlib.py", line 34, in __exit__
          self.gen.throw(type, value, traceback)
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 152, in save_modules
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 126, in __exit__
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
        File "build/bdist.linux-x86_64/egg/setuptools/sandbox.py", line 110, in dump
      MemoryError
      lmschrabmair@si204:~>

I think this a new bug: See BUG in Setupt tools

我认为这是一个新的bug:请参阅Setupt工具中的BUG

1 个解决方案

#1


isbntools installer tries to create a directory in your user area (to put inside configuration and cache files). easy_install doesn't allow it for a system's installation on some linux distributions.

isbntools安装程序尝试在您的用户区域中创建一个目录(以放入配置和缓存文件)。 easy_install不允许在某些Linux发行版上安装系统。

So you have these options:

所以你有这些选择:

  1. use easy_install with flag --user for a user's installation.
  2. 使用easy_install和flag --user进行用户安装。

  3. install isbntools in a virtual environment using easy_install.
  4. 使用easy_install在虚拟环境中安装isbntools。

  5. use pip install --user isbntools.
  6. 使用pip install --user isbntools。

  7. use isbntools portable an executable file that implements most of the features of isbntools (no cache and no configuration). You can get it at http://sourceforge.net/projects/isbntools/files/3.3.9/isbntools-3.3.9-linux.amd64.tar.gz/download (just extract the file from the archive).
  8. 使用isbntools可移植的可执行文件,它实现了isbntools的大部分功能(没有缓存,没有配置)。您可以访问http://sourceforge.net/projects/isbntools/files/3.3.9/isbntools-3.3.9-linux.amd64.tar.gz/download(仅从存档中提取文件)。

As follow up to your question:

作为您的问题的后续跟进:

  1. For 1) I can only say, if you have setuptools installed and get a "name 'pkg_resources' is not defined" error, then something wrong is happening with your python installation (take a look a this * question No module named pkg_resources).
  2. 对于1)我只能说,如果你安装了setuptools并得到“名称'pkg_resources'未定义”错误,那么你的python安装就会发生错误(看看这个*问题没有名为pkg_resources的模块)。

  3. For 4) I don't have experience with SUSE, but the program was extensively tested in Debian based systems... without errors. Anyway the program seems to work, only if these annoying sh messages could get filtered...
  4. 4)我没有使用SUSE的经验,但该程序在基于Debian的系统中进行了广泛测试......没有错误。无论如何,程序似乎工作,只有这些烦人的sh消息可以被过滤...

Why don't you try the option 2)?

你为什么不试试2)?

#1


isbntools installer tries to create a directory in your user area (to put inside configuration and cache files). easy_install doesn't allow it for a system's installation on some linux distributions.

isbntools安装程序尝试在您的用户区域中创建一个目录(以放入配置和缓存文件)。 easy_install不允许在某些Linux发行版上安装系统。

So you have these options:

所以你有这些选择:

  1. use easy_install with flag --user for a user's installation.
  2. 使用easy_install和flag --user进行用户安装。

  3. install isbntools in a virtual environment using easy_install.
  4. 使用easy_install在虚拟环境中安装isbntools。

  5. use pip install --user isbntools.
  6. 使用pip install --user isbntools。

  7. use isbntools portable an executable file that implements most of the features of isbntools (no cache and no configuration). You can get it at http://sourceforge.net/projects/isbntools/files/3.3.9/isbntools-3.3.9-linux.amd64.tar.gz/download (just extract the file from the archive).
  8. 使用isbntools可移植的可执行文件,它实现了isbntools的大部分功能(没有缓存,没有配置)。您可以访问http://sourceforge.net/projects/isbntools/files/3.3.9/isbntools-3.3.9-linux.amd64.tar.gz/download(仅从存档中提取文件)。

As follow up to your question:

作为您的问题的后续跟进:

  1. For 1) I can only say, if you have setuptools installed and get a "name 'pkg_resources' is not defined" error, then something wrong is happening with your python installation (take a look a this * question No module named pkg_resources).
  2. 对于1)我只能说,如果你安装了setuptools并得到“名称'pkg_resources'未定义”错误,那么你的python安装就会发生错误(看看这个*问题没有名为pkg_resources的模块)。

  3. For 4) I don't have experience with SUSE, but the program was extensively tested in Debian based systems... without errors. Anyway the program seems to work, only if these annoying sh messages could get filtered...
  4. 4)我没有使用SUSE的经验,但该程序在基于Debian的系统中进行了广泛测试......没有错误。无论如何,程序似乎工作,只有这些烦人的sh消息可以被过滤...

Why don't you try the option 2)?

你为什么不试试2)?