【问题标题】:Error installing upgrade from Sphinx 1.1 to 1.1.3 for Python 3.2.3 on Windows XP在 Windows XP 上为 Python 3.2.3 安装从 Sphinx 1.1 到 1.1.3 的升级时出错
【发布时间】:2012-08-14 13:29:30
【问题描述】:

按照 Sphinx 主页上的说明,我打开一个命令窗口并输入:

C:\>easy_install -U Sphinx

(我假设升级的 -U 选项应该删除现有版本。)

我收到以下错误消息(我有管理员权限):

Creating c:\python32\lib\site-packages\site.py
Processing Sphinx
Running setup.py -q bdist_egg --dist-dir C:\Sphinx\egg-dist-tmp-tmopj5
error: Setup script exited with error: SandboxViolation: 
open('C:\\Python32\\lib\\lib2to3\\Grammar3.2.3.final.0.pickle', 'wb') {}

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.

谁能帮我理解和解决这个问题?请不要告诉我使用 pip,当我尝试安装 pip 时遇到同样的错误:

C:\>easy_install pip

提前感谢您的帮助。

【问题讨论】:

    标签: python python-3.x python-sphinx easy-install


    【解决方案1】:

    我在尝试安装请求库时遇到此错误消息。它似乎与构建期间未生成的文件有关 (http://bugs.python.org/issue15822),但如果要使用 2to3 实用程序则需要。

    对我来说一个快速的解决方法是手动构建所需的腌制语法:

    C:\Python33\Lib>..\python.exe -m lib2to3.pgen2.driver lib2to3\Grammar.txt
    Generating grammar tables from lib2to3\Grammar.txt
    Writing grammar tables to lib2to3\Grammar3.3.1.final.0.pickle
    
    C:\Python33\Lib>..\python.exe -m lib2to3.pgen2.driver lib2to3\PatternGrammar.txt
    
    Generating grammar tables from lib2to3\PatternGrammar.txt
    Writing grammar tables to lib2to3\PatternGrammar3.3.1.final.0.pickle
    

    我在 python 3.3.1 上对此进行了测试,但我相信同样的过程应该适合你。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-08-04
      • 2010-12-16
      • 2015-06-06
      • 1970-01-01
      • 1970-01-01
      • 2016-10-07
      • 2016-08-15
      相关资源
      最近更新 更多