If you install Python 3.3b2 with "sudo make install", a standard way of installing it so that users don't have rights to install global modules, then everytime lib2to3.pgen2.driver.load_grammar() is called, it aims to generate a a grammar table and write it as a pickle to a cache file.
However, unless you are superuser when doing this, writing the file will of course fail, with a message similar to this:
INFO:root:Generating grammar tables from /opt/python33/lib/python3.3/lib2to3/PatternGrammar.txt
INFO:root:Writing grammar tables to /opt/python33/lib/python3.3/lib2to3/PatternGrammar3.3.0.beta.2.pickle
INFO:root:Writing failed:[Errno 13] Permission denied: '/opt/python33/lib/python3.3/lib2to3/PatternGrammar3.3.0.beta.2.pickle'
A workaround is to run the script that creates the above errors as superuser once, and the message goes away.
I think the correct thing to do here is for make install to Generate these grammar tables and write the pickle.
Steps to reproduce:
1. Install Python 3.3.b2 with "./configure;make;sudo make install"
2. Check out the Distribute sources: "hg clone https://bitbucket.org/stefanholek/distribute"
3. Run the Distribute tests: "python3.3 setup.py test"
|