Spyder not able to use installed python library

919 views
Skip to first unread message

Jason Mellone

unread,
Jan 5, 2014, 3:19:26 PM1/5/14
to spyd...@googlegroups.com
Hi,

I installed the Quandl library using:


 $ sudo easy_install quandl
    Password:
    Searching for quandl
    Reading http://pypi.python.org/simple/quandl/
    Best match: Quandl 1.8.1
    Downloading https://pypi.python.org/packages/source/Q/Quandl/Quandl-1.8.1.tar.gz#md5=f67bef937eb7522d70cf39ed0de740c1
    Processing Quandl-1.8.1.tar.gz
    Running Quandl-1.8.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-BEwINw/Quandl-1.8.1/egg-dist-tmp-aBuphk
    zip_safe flag not set; analyzing archive contents...
    Adding Quandl 1.8.1 to easy-install.pth file

    Installed /Library/Python/2.7/site-packages/Quandl-1.8.1-py2.7.egg
    Processing dependencies for quandl
    Finished processing dependencies for quandl

And I can use it quite easily from the terminal:

 $ python2.7
    Python 2.7.5 (default, Aug 25 2013, 00:04:04) 
    [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import Quandl
    >>> data= Quandl.get(['GOOG/NASDAQ_AAPL.4','GOOG/NASDAQ_MSFT.4'])
    No authentication tokens found: usage will be limited.
    See www.quandl.com/api for more information.
    Returning Dataframe for  [u'GOOG.NASDAQ_AAPL.4', u'GOOG.NASDAQ_MSFT.4']
    >>> data
    <class 'pandas.core.frame.DataFrame'>
    DatetimeIndex: 8294 entries, 1981-03-11 00:00:00 to 2014-01-03 00:00:00
    Data columns (total 2 columns):
    GOOG.NASDAQ_AAPL - Close    8294  non-null values
    GOOG.NASDAQ_MSFT - Close    7027  non-null values
    dtypes: float64(2)

Yet when I try to use this in Spyder I get the following error:
        >>> import Quandl
        Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        ImportError: No module named Quandl


Any ideas?

Thank you very much in advance!
 

Jason Mellone

unread,
Jan 6, 2014, 11:49:59 AM1/6/14
to spyd...@googlegroups.com
Sorry for double post. Deleted duplicate.

Thomas Kluyver

unread,
Jan 6, 2014, 1:50:06 PM1/6/14
to spyd...@googlegroups.com
On Sunday, 5 January 2014 12:19:26 UTC-8, Jason Mellone wrote:
Yet when I try to use this in Spyder I get the following error:
        >>> import Quandl
        Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        ImportError: No module named Quandl

What is sys.path inside the Spyder console? You might have installed them into separate Python installations.

Thomas

Carlos Córdoba

unread,
Jan 7, 2014, 10:13:59 AM1/7/14
to spyd...@googlegroups.com
Hi Jason,

I guess you installed Quandl in your system Python (or any another Python version). Since our Mac application comes with its own Python, it can't detect your module, so you have to instruct it to select your own Python and then you'll be able to import Quandl.

For that please follow the instructions I posted here:

http://stackoverflow.com/a/20485970/438386

Cheers,
Carlos

PS. I'll add these instructions to our next version because this is the most asked question in SO :-)

El 06/01/14 13:50, Thomas Kluyver escribió:
--
You received this message because you are subscribed to the Google Groups "spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spyderlib+...@googlegroups.com.
To post to this group, send email to spyd...@googlegroups.com.
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/groups/opt_out.

Alban Gerome

unread,
Jan 12, 2021, 9:36:11 PM1/12/21
to spyder
Good evening,

I get the same error on Windows 10. I have installed Quandl using pip install quandl and it runs fine in the python REPL. But in Spyder import quandl fails because it can't find the module as per the above.

I have tried to make Spyder use the same python executable as what the python REPL uses as per the Stack Overflow post mentioned above but then Spyder rejects the path. I have tried replacing the double backs-slashes to single back-slashes, and then to single forward-slashes, it's still complaining. I have tried to copy the Python executable into the Spyder directory I got a 0x80070780 error, a permissions error but I am an admin user.

I have tried Quandl instead of quandl, it didn't work. pip list shows Quandl with the capital Q.

I use Spyder 4.2.1 on Windows 10. If all else fails I'll go back to the R script I wrote a long time ago, or perhaps try it in Julia. Any ideas?

Thanks,

Alban

Kiko

unread,
Jan 14, 2021, 3:44:05 AM1/14/21
to spyd...@googlegroups.com
2021-01-11 0:40 GMT+01:00, Alban Gerome <alban...@gmail.com>:
> Good evening,
>
> I get the same error on Windows 10. I have installed Quandl using pip
> install quandl and it runs fine in the python REPL. But in Spyder import
> quandl fails because it can't find the module as per the above.
>
> I have tried to make Spyder use the same python executable as what the
> python REPL uses as per the Stack Overflow post mentioned above but then
> Spyder rejects the path. I have tried replacing the double backs-slashes to
>
> single back-slashes, and then to single forward-slashes, it's still
> complaining. I have tried to copy the Python executable into the Spyder
> directory I got a 0x80070780 error, a permissions error but I am an admin
> user.
>
> I have tried Quandl instead of quandl, it didn't work. pip list shows
> Quandl with the capital Q.
>
> I use Spyder 4.2.1 on Windows 10. If all else fails I'll go back to the R
> script I wrote a long time ago, or perhaps try it in Julia. Any ideas?

It seems you have several python installations. Are you using virtual
environments? If so, you have to install quandl in the same
environment where spyder is installed or you can change the kernel to
use to use the one where quandl is installed but you'll need to
install spyder-kernels within that environment. Have a look here:
https://docs.spyder-ide.org/current/ipythonconsole.html
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/spyderlib/15d32567-3b6d-47c7-afc2-1487a0c4e03cn%40googlegroups.com.
>
Reply all
Reply to author
Forward
0 new messages