crushee crushee - 1 year ago 213
Python Question

Python error importing already install module

I'm having an error with Python successfully installing a module but not being to load it.

Currently I'm using Python 3.5.1, Anaconda 2.4.1 (64-bit) in a Juptyer notebook on Windows 7.

I ran

pip install quandl
which completed successfully. If I run it again I get

> Requirement already satisfied (use --upgrade to upgrade): quandl in
> c:\users\crushee\anaconda3\lib\site-packages

Additionally the quandl module is listed when I run
pip freeze

When I'm in the notebook and run
it also returns that same installation directory. I've also added this directory to PYTHONPATH system variable in Windows

> ['', 'C:\\Users\\crushee\\Anaconda3\\Lib',
> 'c:\\users\\crushee\\anaconda3\\lib\\site-packages\\setuptools-19.1.1-py3.5.egg',
> 'C:\\Users\\crushee\\Anaconda3\\Lib\\site-packages\\

However when I try
import quandl
it returns an error of

ImportError Traceback (most recent call last)
<ipython-input-5-ab7fa5ad38a5> in <module>()
----> 1 import quandl

ImportError: No module named 'quandl'

Lastly here's the output if I try to import it in verbose mode

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<frozen importlib._bootstrap>", line 969, in > _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked ImportError: No module name 'quandl'

Any help would be greatly appreciated

Answer Source


import Quandl

You might face other import errors for other packages (like I faced import error for pandas. So, install pandas). It is installed as Quandl in /usr/local/lib/<python>/dist-packages.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download