0

1) Module Azure-storage is installed:

sudo -H pip install azure-storage

Requirement already satisfied: azure-storage in /usr/local/lib/python2.7/dist-packages

2) In my python programme:

from azure.storage.table import TableService 

gives me an error:

ImportError: No module named storage.table

3) However, if I open an interactive session I don't see the error:

sandeep@viepstesting:~$ python
Python 2.7.12+ (default, Sep 17 2016, 12:08:02)
[GCC 6.2.0 20160914] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from azure.storage.table import TableService

I went through the several post on this topic on this forum, nothing seems to work. E.g. tried setting PYTHONPATH to /usr/local/lib/python2.7/dist-packages and /usr/local/lib/python2.7/dist-packages/

pppery
  • 3,731
  • 22
  • 33
  • 46
Sandeep Vaidya
  • 113
  • 1
  • 13
  • Possible duplicate of [Importing installed package from script raises "AttributeError: module has no attribute" or "ImportError: cannot import name"](https://stackoverflow.com/questions/36250353/importing-installed-package-from-script-raises-attributeerror-module-has-no-at) – pppery Aug 19 '19 at 13:45

1 Answers1

1

I will close this issue as I now think the problem was that i had a file named azure.py in the same directory.

It did not like the azure filename

Sandeep Vaidya
  • 113
  • 1
  • 13