Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

ModuleNotFoundError: No module named 'importlib_metadata' while installing pint in python

I have tried installing pint using pip. But whenever I am trying, I am getting ModuleNotFoundError: No module named 'importlib_metadata'.

Traceback:

ModuleNotFoundError                       Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\pint\__init__.py in <module>
     32 try:
---> 33     from importlib.metadata import version
     34 except ImportError:

ModuleNotFoundError: No module named 'importlib.metadata'

During handling of the above exception, another exception occurred:

ModuleNotFoundError                       Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_31716/1730524550.py in <module>
      9 
     10 # import units
---> 11 from pint import UnitRegistry
     12 units = UnitRegistry()

C:\ProgramData\Anaconda3\lib\site-packages\pint\__init__.py in <module>
     34 except ImportError:
     35     # Backport for Python < 3.8
---> 36     from importlib_metadata import version
     37 
     38 try:  # pragma: no cover

ModuleNotFoundError: No module named 'importlib_metadata'

I need to run it urgently. What should I do? Thank you in advance.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can try running in Google Colab.

To install in your notebook in Google Colab, please use !pip install pint.

It will work. Atleast as your backup for your urgency hopefully.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading