Make test: ImportError: No module named importlib

2,015 views
Skip to first unread message

Ole Bülow

unread,
Sep 24, 2014, 4:28:35 AM9/24/14
to simian-...@googlegroups.com
Hi everyone. 

When trying to do a make test i get the following error:

"

Traceback (most recent call last):

  File "setup.py", line 94, in <module>

    google_test_dir = 'src/tests',

  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/core.py", line 152, in setup

    dist.run_commands()

  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands

    self.run_command(cmd)

  File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py", line 995, in run_command

    cmd_obj.run()

  File "/Users/s3-admin/simian/trunk/VE/lib/python2.6/site-packages/setuptools/command/test.py", line 138, in run

    self.with_project_on_sys_path(self.run_tests)

  File "/Users/s3-admin/simian/trunk/VE/lib/python2.6/site-packages/setuptools/command/test.py", line 118, in with_project_on_sys_path

    func()

  File "/Users/s3-admin/simian/trunk/google_apputils-0.4.0-py2.6.egg/google/apputils/setup_command.py", line 157, in run_tests

    ok &= self._RunTestModule(file_path)

  File "/Users/s3-admin/simian/trunk/google_apputils-0.4.0-py2.6.egg/google/apputils/setup_command.py", line 123, in _RunTestModule

    module = imp.load_module(module_name, *import_tuple)

  File "src/tests/simian/mac/admin/panic_test.py", line 25, in <module>

    from django.conf import settings

  File "/Users/s3-admin/simian/trunk/Django-1.7-py2.6.egg/django/conf/__init__.py", line 9, in <module>

    import importlib

ImportError: No module named importlib

make: *** [test] Error 1

"


What do do?

John Randolph

unread,
Sep 24, 2014, 10:37:32 AM9/24/14
to simian-...@googlegroups.com

hi Ole

at first glance, it seems you are running django in python 2.6, but importlib does not exist until python 2.7. your back trace also reveals 2.6 in the sys frameworks path. can you use a newer python or force an older django in the setup.py?

John

// mobile

--
You received this message because you are subscribed to the Google Groups "Simian Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simian-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ole Bülow

unread,
Sep 24, 2014, 11:35:59 AM9/24/14
to simian-...@googlegroups.com
Well i just did this: 
So how would i change to python 2.7 in the google code?
Reply all
Reply to author
Forward
0 new messages