简体   繁体   中英

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:

C:\>easy_install -U Sphinx

(I assume the -U option for upgrade should remove the existing version.)

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:

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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