Our setup.py does not yet do the right thing for 2to3 conversions with
Python 3, manually run the tests and it should work in Python 3.3+

2014-09-01 3:03 GMT-07:00 EARob Agar <[email protected]>:
> How can I install protobuf 2.6 for use by python 3?  Both pip3 install
> protobuf and manual installation with python3 setup.py build fail with an
> InvalidSyntax exception in ez_setup.py.
>
> FWIW, here's the full stack trace
>
> rob@rob-pc:~/lib/protobuf/python$ python3 setup.py build
> Traceback (most recent call last):
>   File "setup.py", line 199, in <module>
>     "Protocol Buffers are Google's data interchange format.",
>   File "/usr/lib/python3.4/distutils/core.py", line 108, in setup
>     _setup_distribution = dist = klass(attrs)
>   File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line
> 262, in __init__
>     self.fetch_build_eggs(attrs['setup_requires'])
>   File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line
> 287, in fetch_build_eggs
>     replace_conflicting=True,
>   File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 631,
> in resolve
>     dist = best[req.key] = env.best_match(req, ws, installer)
>   File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 874,
> in best_match
>     return self.obtain(req, installer)
>   File "/usr/local/lib/python3.4/dist-packages/pkg_resources.py", line 886,
> in obtain
>     return installer(requirement)
>   File "/usr/local/lib/python3.4/dist-packages/setuptools/dist.py", line
> 338, in fetch_build_egg
>     return cmd.easy_install(req)
>   File
> "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py",
> line 613, in easy_install
>     return self.install_item(spec, dist.location, tmpdir, deps)
>   File
> "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py",
> line 643, in install_item
>     dists = self.install_eggs(spec, download, tmpdir)
>   File
> "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py",
> line 833, in install_eggs
>     return self.build_and_install(setup_script, setup_base)
>   File
> "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py",
> line 1055, in build_and_install
>     self.run_setup(setup_script, setup_base, args)
>   File
> "/usr/local/lib/python3.4/dist-packages/setuptools/command/easy_install.py",
> line 1040, in run_setup
>     run_setup(setup_script, args)
>   File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line
> 68, in run_setup
>     DirectorySandbox(setup_dir).run(runner)
>   File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line
> 114, in run
>     return func()
>   File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line
> 67, in runner
>     _execfile(setup_script, ns)
>   File "/usr/local/lib/python3.4/dist-packages/setuptools/sandbox.py", line
> 43, in _execfile
>     exec(code, globals, locals)
>   File "/tmp/easy_install-thdmg8q1/google-apputils-0.4.0/setup.py", line 18,
> in <module>
>     sys.stderr.write(
>   File "/tmp/easy_install-thdmg8q1/google-apputils-0.4.0/ez_setup.py", line
> 79
>     except pkg_resources.VersionConflict, e:
>                                         ^
> SyntaxError: invalid syntax
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to