7

I'm trying to install Odoo 15.0 on mac (python 3.7) when i come to run the command:

pip3 install -r requirements.txt

I got this error message:

Traceback (most recent call last):
File "/usr/local/opt/python@3.7/bin/pip3", line 10, in <module>
from importlib.metadata import distribution
ModuleNotFoundError: No module named 'importlib.metadata'
Reddy Lutonadio
  • 302
  • 1
  • 4
  • 10
Omri Maher
  • 101
  • 1
  • 1
  • 7

2 Answers2

10

Try installing this lib manually, using :

pip install importlib-metadata

or

pip3 install importlib-metadata

Omar Tougui
  • 183
  • 2
  • 8
  • Many thanks for you it this issue is solved, but i got another one: python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [25 lines of output] – Omri Maher Jul 29 '22 at 11:39
  • 1
    @OmriMaher this is a separate issue and should be asked in its own question after you have tried to solve it yourself. – blackbrandt Jul 29 '22 at 11:42
1

Note that while the accepted answer was relevant for the specific version of Python used in the question (3.7 or older), and asked at the moment of asking, now it has become obsolete, because Python 3.7 has since reached its end-of-life.

Since Python 3.8 the importib-metadata third-party library has been merged into CPython and became its importlib.metadata module, so it is now possible to use it like this:

from importlib.metadata import distribution,metadata,version
mirekphd
  • 4,799
  • 3
  • 38
  • 59