Repository navigation
Closed
Labels
Milestone
Description
Both pip-3.4 install protobuf and manual installation with python3 setup.py build fail with an invalid syntax exception in ez_setup.py.
Tested 2.6.0 using Python 3.4 on Ubuntu 14.04.
Stack trace from the failed manual installation:
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
Activity
gpshead commentedon Sep 3, 2014
See my comment on #7 with details for what remains to be done for this to work out of the box under Python 3. The setup code hasn't been updated for python 3 yet; the listed files in that issue need running through 2to3 as part of the process.
virtuald commentedon Nov 30, 2014
I installed the current trunk on OSX with python 3.4.2, and everything works fine.
virtuald commentedon Dec 9, 2014
I can also confirm Fedora 21 works.
virtuald commentedon Dec 17, 2014
This bug should be closed, was fixed via #50
bearrito commentedon Jan 12, 2015
Not working for me on 3.4 in a virtualenv running on Centos 6.6
virtuald commentedon Jan 12, 2015
@bearrito , 2.6.1 does not work. You need to install the 3.0.0 alpha (specify the --pre flag to pip to get it).
gregsskyles commentedon Aug 2, 2015
I downloaded 3.0.0-alpha-3 cpp and python, built protoc and python, then 'python setup.py test' dies when it gets to this line from the supplied file google/protobuf/internal/decoder.py:
except UnicodeDecodeError, e:
with the clearly Python 2 syntax...are we supposed to use python 2 to build the python 3 compatible version?
Merge pull request protocolbuffers#9 from jtattermusch/add_system_mem…
Merge pull request protocolbuffers#9 from cfallin/map-fields
Merge pull request protocolbuffers#9 from PierrickVoulet/testIssue7
Silence MSAN warning when running protoc
Silence MSAN warning when running protoc
Silence MSAN warning when running protoc
Silence MSAN warning when running protoc
Silence MSAN warning when running protoc
Silence MSAN warning when running protoc
Silence MSAN warning when running protoc
Silence MSAN warning when running protoc