Search code examples
pythonpipquandl

Using the Quandl package in Python, get the AttributeError "module 'Quandl' has no attribute get"


On a Windows computer with Anaconda installed, I tried to install the Quandl Python package by typing the following in the command line:

pip install Quandl

I get a confirmation "Successfully installed Quandl-2.8.9". Next, I would like to use Quandl. In a new Python script in Spyder try the following commands:

import Quandl
mydata=Quandl.get("FRED/GDP")

However, this yields the error message

AttributeError: module 'Quandl' has no attribute 'get'

I suspect that Quandl is somehow not installed properly. Is there some aspect of the installation I'm missing?


Solution

  • As pointed out by kindall, I had inadvertently named the script "Quandl.py". I renamed it and the code works as expected.