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 512.0 KiB each and 1.0 MiB total.

Hello @Michael Ronald Cortez.Espinosa

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS


Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
25.3k 87 12 25

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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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