简体   繁体   English

在Windows XP上安装从Sphinx 1.1升级到Python 3.2.3的1.1.3时出错

[英]Error installing upgrade from Sphinx 1.1 to 1.1.3 for Python 3.2.3 on Windows XP

Following the directions on the Sphinx home page, I opened a command window and entered: 按照Sphinx主页上的指示,我打开一个命令窗口并输入:

C:\>easy_install -U Sphinx

(I assume the -U option for upgrade should remove the existing version.) (我假设升级的-U选项应该删除现有版本。)

I get the following error messages (I have admin privileges): 我收到以下错误消息(我具有管理员权限):

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.

Can anyone help me to understand and fix the problem? 谁能帮助我理解和解决问题? Please don't tell me to use pip, I get the same error when I try to install pip with: 请不要告诉我使用pip,当我尝试使用以下方法安装pip时,出现相同的错误:

C:\>easy_install pip

Thanks in advance for your help. 在此先感谢您的帮助。

I encountered this error message while trying to install the requests library. 尝试安装请求库时遇到此错误消息。 It seems to be related to files that are not generated during the build ( http://bugs.python.org/issue15822 ) but are required if the 2to3 utility is to be used. 它似乎与在构建过程中未生成的文件( http://bugs.python.org/issue15822 )有关,但是如果要使用2to3实用程序则是必需的。

A quick fix for me was to build the required pickled grammars manually: 对我来说,一个快速解决方案是手动构建所需的腌制语法:

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

I tested this on python 3.3.1 but I believe the same procedure should work for you. 我在python 3.3.1上进行了测试,但我相信相同的过程应该对您有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM