question

Upvotes
Accepted

ModuleNotFoundError: No module named 'dataclasses' when import refinitiv.dataplatform as rdp

When I tried to import the package (import refinitiv.dataplatform as rdp), I kept telling that data classes could not be found. I reinstalled refinitiv-dataplatform several times and still got the same result.

It has not yet progressed to the verification step. The first step is to import the development package, there is a problem, please see the screenshot.


python-image.png

rdp-apipython api
python-image.png (57.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
20.3k 73 10 20

Hi @Michael Ronald Cortez.Espinosa

Dataclasses (https://docs.python.org/3/library/dataclasses.html) were introduced in Python 3.7.

The PyPi page for RDP states that it requires Python > 3.6 refinitiv-dataplatform · PyPI

The log above shows that you are using v3.6.4

Please upgrade your python version e.g. to v3.8 or v3.9




icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea