quandl issue with Pycharm

850 views Asked by At

I have installed quandl via pip through Anaconda Prompt and everything seems good. But then, I can't use quandl on my PyCharm.
I have Python 3.

I have tried several solutions, but none seem to work.

However, quandl works fine in Spyder.

Any suggestion to make it work in PyCharm?

It's very weird because even if I just type import quandl in PyCharm and run it, then I get the quandl has no get attribute error!

2

There are 2 answers

2
Kyle's Corpse On

Make sure Pycharm is using the Python interpreter you installed quandl on.

In Pycharm the Interpreter Settings are found under

>File, >Settings, >Project:, >Project Interpreter
0
Giordano On

If import quandl works on python3 (terminal) or in Spider and not in Pycharm, is probably a configuration problem.

You should set the correct Python Interpreter in Pycharm settings.
Follow this path in pyCharm:

File -> Settings -> Project -> Project Interpreter

Then, select which one that contains quandl.

Anyway, I suggest you a different approach: i think that the best solution is set an anaconda environment for each project. In this way you can set the project interpreter with the anaconda environment and all will work well.

To create an environment use the following command:

conda create -n <name> python=x.x anaconda

then activate it with

activate <name>         (Windows)
source activate <name>  (Linux)

install new packages in this way:

conda install -n <name> <package>

At the end deactivate environment:

source deactivate

I link this tutorial on anaconda environments.