anicehat
anicehat

Reputation: 57

Cannot import quandl in Python 3

I have spyder (Python2.7) and spyder3 (Python3.5) installed on Ubuntu 16.04. I was able to import quandl in spyder (Python2.7) setup, but not in spyder3 (Python3.5). Do you have any suggestions?

Below is the error returned in the terminal when testing Python 3.5:

Python 3.5.2 (default, Nov 17 2016, 17:05:23) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import quandl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'quandl'
>>> import Quandl
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'Quandl'

Upvotes: 3

Views: 17720

Answers (8)

Akoffice
Akoffice

Reputation: 381

try install pip3 install Quandl but for importing use :-

import quandl ##it works

Upvotes: 0

Aghyad Algllad
Aghyad Algllad

Reputation: 1805

I was following a tutorial where it said
import Quandl
instead I used import quandl and it worked
I had the same problem although I have installed quandl correctly using pip install quandl
hope this helps somebody

Upvotes: 5

hatef
hatef

Reputation: 6199

Quandl actually changed their namespace from Quandl (in v.2) to quandl (in version 3).

So if you upgrade an existing package with:

pip install --upgrade quandl

The least painful way to fix the import issues is to change: import Quandl to import quandl as Quandl, wherever you have previously used it in your application.

On the other hand, for a fresh install you can just use this command:

pip install quandl

You can read more in their official Github repository readme.

Upvotes: 0

CodingMatters
CodingMatters

Reputation: 1431

for anyone still looking at this problem.

just tried to install on an AWS ubuntu community machine learning instance.

could not get this to install on python 2.7 by pip install or by git clone xxx and python setup.py install

pip3 install quandl worked first attempt.

another reason to migrate from python 2.7 to python 3.x before end of life for python 2.7.

Upvotes: 0

L&#234; Huy H&#249;ng
L&#234; Huy H&#249;ng

Reputation: 265

try lowercase. it works for in 3.5.2

Upvotes: 15

Steve Hope
Steve Hope

Reputation: 254

On systems that have both 2.x and 3.x installed you need to adjust your use of the pip command as follows:

To pip install package_name to target your 2.x python use: pip install package_name

To pip install package_name to target your 3.x python use: pip3 install package_name

Do not rename / reassign pip and pip3, they are not the same.

Upvotes: 1

nivhanin
nivhanin

Reputation: 1908

Maybe pip3 install quandlwill work here.

However, you can find explicitly your pip script inside your python3 directory. then run the following command:

pip install quandl

you can rename or alias pip script inside the python3 directory to pip3 for better use in the future.

Upvotes: 0

Aaron Brock
Aaron Brock

Reputation: 4536

It would seem your Python3.5 installation does not have quandl installed.

You can install quandl easily via pip using: pip install quandl

(or pip3 install quandl depending on your system's configuration)

Upvotes: 3

Related Questions