1

I've taken a look at all forums on SO regarding this error like this but I cannot seem to resolve my issue.

I'm trying to import the us module but I kept getting the same import error when running a Luigi task: ImportError: No module named us

I've tried to force install it with pip install us —ignore-installed as well as uninstalling it and reinstalling it.

Below is the output of pip show us

 pip show us
---
Metadata-Version: 2.0
Name: us
Version: 0.9.1
Summary: US state meta information and other fun stuff
Home-page: https://github.com/unitedstates/python-us
Author: Jeremy Carbaugh
Author-email: jcarbaugh@sunlightfoundation.com
License: BSD
Location: /usr/local/lib/python2.7/site-packages
Requires: jellyfish

Any thoughts?

Community
  • 1
  • 1
Minh
  • 2,180
  • 5
  • 23
  • 50
  • So the us module works when used without luigi, but it fails (import error) when used inside of luigi? Or is the us module not being found at all? – Charlie Haley Dec 03 '15 at 18:55
  • Yes it is the former. When I try importing `us` inside a standalone python shell, it'll work. But for some reason luigi doesn't seem to recognize the module when importing. – Minh Dec 03 '15 at 18:56
  • How are you importing it when using luigi? How are you running your luigi pipeline? – Charlie Haley Dec 03 '15 at 18:57
  • it would be nice to see your task and how you are running it – matagus Dec 04 '15 at 15:06

0 Answers0