konradhalas / dacite

Simple creation of data classes from dictionaries.
MIT License
1.72k stars 106 forks source link

Using dacite fails at runtime with pkg_resources.DistributionNotFound #240

Closed Cypher1 closed 1 year ago

Cypher1 commented 1 year ago

Describe the bug Getting error:

pkg_resources.DistributionNotFound: The 'dataclasses; python_version < "3.7"' distribution was not found and is required by dacite

When attempting to use dacite.

To Reproduce (not sure this will repro) Install python3.10.12. Install a package using dacite.

Expected behavior Package runs as normal.

Environment

Cypher1 commented 1 year ago

I think this is a bug where a conditional requirement is being parsed and used unconditionally, but I'm still trying to work out how this is occuring. Might just go back to python 3.7 for now...

Cypher1 commented 1 year ago

Possibly a false positive due to having a package installed with a python requirement of python 3.7 and having python3.10 installed. A fresh virtual environment with updated requirements seems to have fixed it.