[IPython-User] IPython-User Digest, Vol 100, Issue 30

Comer Duncan comer.duncan@gmail....
Thu Feb 23 15:15:55 CST 2012


Fernando,

Ok, I got the tarball and ran the following  attempt at install:

[homelap-3:~/Downloads/docutils] comerduncan% sudo python2.7 ./setup.py install
Password:
running install
running build
running build_py
running build_scripts
running build_data
running install_lib
byte-compiling /Library/Python/2.7/site-packages/docutils/_string_template_compat.py
to _string_template_compat.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/docutils/_string_template_compat.py',
51, 25, 'class Template(metaclass=_TemplateMetaclass):\n'))

byte-compiling /Library/Python/2.7/site-packages/docutils/core.py to core.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/docutils/core.py', 239, 50, "
      print('\\n::: Runtime settings:', file=self._stderr)\n"))

byte-compiling /Library/Python/2.7/site-packages/docutils/io.py to io.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/docutils/io.py', 221, 51, '
            print(ErrorString(error), file=self._stderr)\n'))

byte-compiling /Library/Python/2.7/site-packages/docutils/statemachine.py
to statemachine.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/docutils/statemachine.py', 218,
75, "                % (self.line_offset, '\\n|
'.join(self.input_lines))), file=self._stderr)\n"))

byte-compiling /Library/Python/2.7/site-packages/test/DocutilsTestSupport.py
to DocutilsTestSupport.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/test/DocutilsTestSupport.py', 212,
49, "            print('\\n%s\\ninput:' % (self,),
file=sys.stderr)\n"))

byte-compiling /Library/Python/2.7/site-packages/test/package_unittest.py
to package_unittest.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/test/package_unittest.py', 99, 45,
'            print("importing %s" % mod, file=sys.stderr)\n'))

byte-compiling /Library/Python/2.7/site-packages/test/test_functional.py
to test_functional.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/test/test_functional.py', 197, 42,
"            print('\\n%s:' % (self,), file=sys.stderr)\n"))

byte-compiling /Library/Python/2.7/site-packages/test/test_settings.py
to test_settings.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/test/test_settings.py', 111, 43, "
           print('\\n%s\\n' % (self,), file=sys.stderr)\n"))

byte-compiling /Library/Python/2.7/site-packages/test/test_statemachine.py
to test_statemachine.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/test/test_statemachine.py', 59,
65, "        if self.debug: print('StateMachine%s' % self.level,
file=sys.stderr)\n"))

byte-compiling /Library/Python/2.7/site-packages/tools/buildhtml.py to
buildhtml.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/tools/buildhtml.py', 204, 47, '
                          directory), file=errout)\n'))

byte-compiling /Library/Python/2.7/site-packages/tools/dev/unicode2rstsubs.py
to unicode2rstsubs.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/tools/dev/unicode2rstsubs.py', 33,
33, '    print(usage_msg % prog, file=sys.stderr)\n'))

byte-compiling /Library/Python/2.7/site-packages/tools/quicktest.py to
quicktest.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/tools/quicktest.py', 61, 34, "
   print('%-15s' % opts, end=' ')\n"))

byte-compiling /Library/Python/2.7/site-packages/tools/rst2odt_prepstyles.py
to rst2odt_prepstyles.pyc
SyntaxError: ('invalid syntax',
('/Library/Python/2.7/site-packages/tools/rst2odt_prepstyles.py', 57,
28, '        print(__doc__, file=sys.stderr)\n'))

running install_scripts
changing mode of /usr/local/bin/rst2html.py to 755
changing mode of /usr/local/bin/rst2latex.py to 755
changing mode of /usr/local/bin/rst2man.py to 755
changing mode of /usr/local/bin/rst2odt.py to 755
changing mode of /usr/local/bin/rst2odt_prepstyles.py to 755
changing mode of /usr/local/bin/rst2pseudoxml.py to 755
changing mode of /usr/local/bin/rst2s5.py to 755
changing mode of /usr/local/bin/rst2xetex.py to 755
changing mode of /usr/local/bin/rst2xml.py to 755
changing mode of /usr/local/bin/rstpep2html.py to 755
running install_data
running install_egg_info
Removing /Library/Python/2.7/site-packages/docutils-0.9-py2.7.egg-info
Writing /Library/Python/2.7/site-packages/docutils-0.9-py2.7.egg-info

As you can see there is a syntax error?!  So what might be going on?

Comer

On Thu, Feb 23, 2012 at 4:01 PM, Fernando Perez <fperez.net@gmail.com> wrote:
> On Wed, Feb 22, 2012 at 2:06 PM, Comer Duncan <comer.duncan@gmail.com> wrote:
>>
>> Ok, I guess it is clear that docutils 0.9 will not work with python
>> 2.7, which is what I have installed and used to put up ipython .13.
>> So, either I also install python 3 or don't use your code...
>
> No, there's something funny going on for you, because I'm using python
> 2.7.2, not python3.  I just tested again by downloading the docutils
> tarball right now:
>
> http://docutils.svn.sourceforge.net/viewvc/docutils/trunk/docutils/?view=tar
>
> which gives me a 0.9 version number, and the code runs fine on a
> simple test notebook with a few figures, creating the html as
> expected.
>
> Cheers,
>
> f
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user


More information about the IPython-User mailing list