Plone - 执行 hello world 教程时出现语法错误
Plone - Syntax Error when doing hello world tutorial
我正在关注 this "hello world" plone.org
教程
但是由于错误我卡在了one moment:
root@junvb:~/Plone/python_dev/env-27# cd hello_world
root@junvb:~/Plone/python_dev/env-27/hello_world# ../bin/python bootstrap.py
Traceback (most recent call last):
File "bootstrap.py", line 70, in <module>
exec urllib2.urlopen(setup_url).read() in ez
File "<string>", line 1
<!DOCTYPE html>
^
SyntaxError: invalid syntax
我转储了完整的 [非常非常长] 控制台输出 here。
是什么原因造成的,如何避免?
编辑:
这里是bootstrap.py
还有 buildout.cfg 在同一个文件夹中
# This is here just for backward compatibility
[buildout]
extends =
src/base.cfg
src/readline.cfg
src/libjpeg.cfg
src/python27.cfg
src/pypy.cfg
src/pypy3.cfg
src/links.cfg
parts =
${buildout:base-parts}
${buildout:readline-parts}
${buildout:libjpeg-parts}
${buildout:python27-parts}
${buildout:pypy-parts}
${buildout:pypy3-parts}
${buildout:links-parts}
python-buildout-root = ${buildout:directory}/src
# we want our own eggs directory and nothing shared from a
# ~/.buildout/default.cfg to prevent any errors and interference
eggs-directory = eggs
[install-links]
prefix = /opt/local
您的 bootstrap.py 似乎已过时并尝试访问不再存在的 URL。您可以像这样更新 bootstrap:
$ rm bootstrap.py
$ wget http://downloads.buildout.org/1/bootstrap.py
$ python2.7 bootstrap.py
$ bin/buildout
我正在关注 this "hello world" plone.org
教程但是由于错误我卡在了one moment:
root@junvb:~/Plone/python_dev/env-27# cd hello_world
root@junvb:~/Plone/python_dev/env-27/hello_world# ../bin/python bootstrap.py
Traceback (most recent call last):
File "bootstrap.py", line 70, in <module>
exec urllib2.urlopen(setup_url).read() in ez
File "<string>", line 1
<!DOCTYPE html>
^
SyntaxError: invalid syntax
我转储了完整的 [非常非常长] 控制台输出 here。
是什么原因造成的,如何避免?
编辑:
这里是bootstrap.py
还有 buildout.cfg 在同一个文件夹中
# This is here just for backward compatibility
[buildout]
extends =
src/base.cfg
src/readline.cfg
src/libjpeg.cfg
src/python27.cfg
src/pypy.cfg
src/pypy3.cfg
src/links.cfg
parts =
${buildout:base-parts}
${buildout:readline-parts}
${buildout:libjpeg-parts}
${buildout:python27-parts}
${buildout:pypy-parts}
${buildout:pypy3-parts}
${buildout:links-parts}
python-buildout-root = ${buildout:directory}/src
# we want our own eggs directory and nothing shared from a
# ~/.buildout/default.cfg to prevent any errors and interference
eggs-directory = eggs
[install-links]
prefix = /opt/local
您的 bootstrap.py 似乎已过时并尝试访问不再存在的 URL。您可以像这样更新 bootstrap:
$ rm bootstrap.py
$ wget http://downloads.buildout.org/1/bootstrap.py
$ python2.7 bootstrap.py
$ bin/buildout