1

I want to use nasdaqdatalink for my project. But when I run the code below I get error. The error given below. How can I solve it?

The code:

import nasdaqdatalink
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import style
from sklearn.linear_model import LinearRegression
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import scale
import matplotlib.dates

style.use('ggplot')

api_key = 'xyz'
nasdaqdatalink.apiconfig = api_key

df = nasdaqdatalink.get('BITFINEX/BTCUSD')

The error:

Traceback (most recent call last):
  File "D:\UYGULAMALAR\PyCharm 2023.1\plugins\python\helpers\pydev\pydevconsole.py", line 364, in runcode
    coro = func()
           ^^^^^^
  File "<input>", line 1, in <module>
  File "D:\UYGULAMALAR\PyCharm 2023.1\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'nasdaqdatalink'

1
  • if pip install nasdaq-data-link didnt work, you can use conda like this: conda install nasdaq-data-link Commented Apr 15, 2023 at 21:38

2 Answers 2

0

As the error says the module is not found. You may try to install the module with this from Powershell in your project path:

pip install nasdaq-data-link
Sign up to request clarification or add additional context in comments.

2 Comments

I installed it. I will try again. The usage of api config nasdaqdatalink.apiconfig = api_key is true ? @Tahirhan
If you can not resolve the module installation issue, you can create a project folder on a C disk and try that path.
0

You should install the module nasdaqdatalink

pip install Nasdaq-Data-Link

https://pypi.org/project/Nasdaq-Data-Link/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.