No module named 'importlib.metadata' - python

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'

Try installing this lib manually, using :
pip install importlib-metadata
or
pip3 install importlib-metadata

Related

Install Crypto using pip in windows

I tried with pycrypto, pycryptodome, and crypto seperately.. But it shows ModuleNotFoundError: No module named 'Crypto'
python -m venv .venv
.venv\scripts\activate
pip install pycryptodome
pip install pycrypto
pip install crypto
Installed all the above library..
(.venv) C:\Users\Gokul\Desktop\New Meter>python send_string.py
Traceback (most recent call last):
File "C:\Users\Gokul\Desktop\New Meter\send_string.py", line 7, in <module>
from Crypto.Cipher import AES
ModuleNotFoundError: No module named 'Crypto'
simply deleted my existing folder of pycrpto/pycryptodome-3.11.0 located at ..\Python\Python310\Lib\site-packages (if any..), then tried
pip install pycryptodome

What is the specific package for this module 'utils'?

Traceback (most recent call last):
File "<ipython-input-2-b085e7ba8941>", line 1, in <module>
from utils import log_progress
ModuleNotFoundError: No module named 'utils'
What is the pip command to install this module?
This is how you can install any python packages :
pip install <package_name>
for your case it would be
pip install utils

pip install - NameError:name __main__ is not defined

I'm currently having some trouble installing the pygments-package. I tried to run:
pip install pygments
But, however, I get the following Error:
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in <module>
sys.exit(__main__._main())
NameError: name '__main__' is not defined
What's the problem?
Edit: My pip version is 9.0.3
I don't remember exactly what it is, but for me it helped simple sudo pip install pygments or pip3 install pygments

Getting an error in python setup.py install

I am trying to install keras using python setup.py install but I am getting an error like this:
Traceback (most recent call last):
File setup.py, line 1, in
from setuptools import setup
ImportError: No module named 'setuptools'
What should I do?
Install setuptools for your system / distro / python version.
https://packaging.python.org/tutorials/installing-packages/#install-pip-setuptools-and-wheel

how to install notify2 module in python 3.5 with my MAC computer?

tried the following command in the terminal,
$ pip3 install notify2
Collecting notify2
Using cached notify2-0.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/fr/hgx7qkc14dsglj7724_9m5780000gn/T/pip-build-0aoqwq0g/notify2/setup.py", line 2, in <module>
import notify2
File "/private/var/folders/fr/hgx7qkc14dsglj7724_9m5780000gn/T/pip-build-0aoqwq0g/notify2/notify2.py", line 38, in <module>
import dbus
ImportError: No module named 'dbus'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/fr/hgx7qkc14dsglj7724_9m5780000gn/T/pip-build-0aoqwq0g/notify2/
So, it seems like I need to install dbus module first. So, I tried
$ pip3 install dbus
Collecting dbus
Could not find a version that satisfies the requirement dbus (from versions: )
No matching distribution found for bus
tried which pip
$ which pip
/Library/Frameworks/Python.framework/Versions/3.5/bin/pip
And does anyone know what shall I do?
You need to install dbus using brew install dbus and then pip install dbus-python

Categories