[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Missing dep in python sdk? "ImportError: No module named builtins"

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 <pabloem@xxxxxxxxxx> 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 <ajamato@xxxxxxxxxx> wrote:

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
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
  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
  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
  File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
  File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
  File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
  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