You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Pablo Estrada <pa...@google.com> on 2018/05/15 22:58:10 UTC
Fwd: Missing dep in python sdk? "ImportError: No module named builtins"
I believe this is a consequence of the recent work to futurize Python
code[1]. I believe Robbe and Valentyn are working on this effort.
We might just need to add the dependency to setup.py?
[1]
https://github.com/apache/beam/commit/cc8bc3fd88d7989cf28ab062117fede102e35bed#diff-7fc98ec2b3fade7eded997b58710422c
On Tue, May 15, 2018 at 3:52 PM Alex Amato <aj...@google.com> wrote:
> FYI
>
> Running from a clean git branch in a virtualenv.
> python setup.py test -s apache_beam.runners.portability.fun_api_runner_test
>
> I guess people have been installing these on their machine's normally.
> Ideally this should be added as a dep in setup.py. I will add the latest
> version and see if I can get it to build properly that way.
>
> Traceback (most recent call last):
> File "setup.py", line 208, in <module>
> 'test': generate_protos_first(test),
> File
> "/usr/local/google/home/ajamato/beam_git/beam/venv/local/lib/python2.7/site-packages/setuptools/__init__.py",
> line 129, in setup
> return distutils.core.setup(**attrs)
> File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
> dist.run_commands()
> File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
> self.run_command(cmd)
> File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
> cmd_obj.run()
> File "setup.py", line 143, in run
> super(cmd, self).run()
> File
> "/usr/local/google/home/ajamato/beam_git/beam/venv/local/lib/python2.7/site-packages/setuptools/command/test.py",
> line 226, in run
> self.run_tests()
> File
> "/usr/local/google/home/ajamato/beam_git/beam/venv/local/lib/python2.7/site-packages/setuptools/command/test.py",
> line 248, in run_tests
> exit=False,
> File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
> self.parseArgs(argv)
> File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
> self.createTests()
> File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
> self.module)
> File "/usr/lib/python2.7/unittest/loader.py", line 130, in
> loadTestsFromNames
> suites = [self.loadTestsFromName(name, module) for name in names]
> File "/usr/lib/python2.7/unittest/loader.py", line 91, in
> loadTestsFromName
> module = __import__('.'.join(parts_copy))
> File
> "/usr/local/google/home/ajamato/beam_git/beam/sdks/python/apache_beam/__init__.py",
> line 86, in <module>
> from apache_beam import coders
> File
> "/usr/local/google/home/ajamato/beam_git/beam/sdks/python/apache_beam/coders/__init__.py",
> line 19, in <module>
> from apache_beam.coders.coders import *
> File
> "/usr/local/google/home/ajamato/beam_git/beam/sdks/python/apache_beam/coders/coders.py",
> line 25, in <module>
> from builtins import object
> ImportError: No module named builtins
>
> --
Got feedback? go/pabloem-feedback
Re: Missing dep in python sdk? "ImportError: No module named builtins"
Posted by Pablo Estrada <pa...@google.com>.
That makes sense. Thanks a lot Valentyn!
On Tue, May 15, 2018 at 5:25 PM Valentyn Tymofieiev <va...@google.com>
wrote:
> Adding dependency on future in the setup.py fixes this for me, sending
> https://github.com/apache/beam/pull/5379.
>
> On Tue, May 15, 2018 at 3:58 PM, Pablo Estrada <pa...@google.com> wrote:
>
>> I believe this is a consequence of the recent work to futurize Python
>> code[1]. I believe Robbe and Valentyn are working on this effort.
>>
>> We might just need to add the dependency to setup.py?
>>
>> [1]
>> https://github.com/apache/beam/commit/cc8bc3fd88d7989cf28ab062117fede102e35bed#diff-7fc98ec2b3fade7eded997b58710422c
>>
>> On Tue, May 15, 2018 at 3:52 PM Alex Amato <aj...@google.com> wrote:
>>
>>> FYI
>>>
>>> Running from a clean git branch in a virtualenv.
>>> python setup.py test -s
>>> apache_beam.runners.portability.fun_api_runner_test
>>>
>>> I guess people have been installing these on their machine's normally.
>>> Ideally this should be added as a dep in setup.py. I will add the latest
>>> version and see if I can get it to build properly that way.
>>>
>>> Traceback (most recent call last):
>>> File "setup.py", line 208, in <module>
>>> 'test': generate_protos_first(test),
>>> File
>>> "/usr/local/google/home/ajamato/beam_git/beam/venv/local/lib/python2.7/site-packages/setuptools/__init__.py",
>>> line 129, in setup
>>> return distutils.core.setup(**attrs)
>>> File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
>>> dist.run_commands()
>>> File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
>>> self.run_command(cmd)
>>> File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
>>> cmd_obj.run()
>>> File "setup.py", line 143, in run
>>> super(cmd, self).run()
>>> File
>>> "/usr/local/google/home/ajamato/beam_git/beam/venv/local/lib/python2.7/site-packages/setuptools/command/test.py",
>>> line 226, in run
>>> self.run_tests()
>>> File
>>> "/usr/local/google/home/ajamato/beam_git/beam/venv/local/lib/python2.7/site-packages/setuptools/command/test.py",
>>> line 248, in run_tests
>>> exit=False,
>>> File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
>>> self.parseArgs(argv)
>>> File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
>>> self.createTests()
>>> File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
>>> self.module)
>>> File "/usr/lib/python2.7/unittest/loader.py", line 130, in
>>> loadTestsFromNames
>>> suites = [self.loadTestsFromName(name, module) for name in names]
>>> File "/usr/lib/python2.7/unittest/loader.py", line 91, in
>>> loadTestsFromName
>>> module = __import__('.'.join(parts_copy))
>>> File
>>> "/usr/local/google/home/ajamato/beam_git/beam/sdks/python/apache_beam/__init__.py",
>>> line 86, in <module>
>>> from apache_beam import coders
>>> File
>>> "/usr/local/google/home/ajamato/beam_git/beam/sdks/python/apache_beam/coders/__init__.py",
>>> line 19, in <module>
>>> from apache_beam.coders.coders import *
>>> File
>>> "/usr/local/google/home/ajamato/beam_git/beam/sdks/python/apache_beam/coders/coders.py",
>>> line 25, in <module>
>>> from builtins import object
>>> ImportError: No module named builtins
>>>
>>> --
>> Got feedback? go/pabloem-feedback
>> <https://goto.google.com/pabloem-feedback>
>>
>
> --
Got feedback? go/pabloem-feedback
Re: Missing dep in python sdk? "ImportError: No module named builtins"
Posted by Valentyn Tymofieiev <va...@google.com>.
Adding dependency on future in the setup.py fixes this for me, sending
https://github.com/apache/beam/pull/5379.
On Tue, May 15, 2018 at 3:58 PM, Pablo Estrada <pa...@google.com> wrote:
> I believe this is a consequence of the recent work to futurize Python
> code[1]. I believe Robbe and Valentyn are working on this effort.
>
> We might just need to add the dependency to setup.py?
>
> [1] https://github.com/apache/beam/commit/cc8bc3fd88d7989cf28ab062117fed
> e102e35bed#diff-7fc98ec2b3fade7eded997b58710422c
> On Tue, May 15, 2018 at 3:52 PM Alex Amato <aj...@google.com> wrote:
>
>> FYI
>>
>> Running from a clean git branch in a virtualenv.
>> python setup.py test -s apache_beam.runners.portability.fun_api_runner_
>> test
>>
>> I guess people have been installing these on their machine's normally.
>> Ideally this should be added as a dep in setup.py. I will add the latest
>> version and see if I can get it to build properly that way.
>>
>> Traceback (most recent call last):
>> File "setup.py", line 208, in <module>
>> 'test': generate_protos_first(test),
>> File "/usr/local/google/home/ajamato/beam_git/beam/venv/
>> local/lib/python2.7/site-packages/setuptools/__init__.py", line 129, in
>> setup
>> return distutils.core.setup(**attrs)
>> File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
>> dist.run_commands()
>> File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
>> self.run_command(cmd)
>> File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
>> cmd_obj.run()
>> File "setup.py", line 143, in run
>> super(cmd, self).run()
>> File "/usr/local/google/home/ajamato/beam_git/beam/venv/
>> local/lib/python2.7/site-packages/setuptools/command/test.py", line 226,
>> in run
>> self.run_tests()
>> File "/usr/local/google/home/ajamato/beam_git/beam/venv/
>> local/lib/python2.7/site-packages/setuptools/command/test.py", line 248,
>> in run_tests
>> exit=False,
>> File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
>> self.parseArgs(argv)
>> File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
>> self.createTests()
>> File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
>> self.module)
>> File "/usr/lib/python2.7/unittest/loader.py", line 130, in
>> loadTestsFromNames
>> suites = [self.loadTestsFromName(name, module) for name in names]
>> File "/usr/lib/python2.7/unittest/loader.py", line 91, in
>> loadTestsFromName
>> module = __import__('.'.join(parts_copy))
>> File "/usr/local/google/home/ajamato/beam_git/beam/sdks/
>> python/apache_beam/__init__.py", line 86, in <module>
>> from apache_beam import coders
>> File "/usr/local/google/home/ajamato/beam_git/beam/sdks/
>> python/apache_beam/coders/__init__.py", line 19, in <module>
>> from apache_beam.coders.coders import *
>> File "/usr/local/google/home/ajamato/beam_git/beam/sdks/
>> python/apache_beam/coders/coders.py", line 25, in <module>
>> from builtins import object
>> ImportError: No module named builtins
>>
>> --
> Got feedback? go/pabloem-feedback
> <https://goto.google.com/pabloem-feedback>
>