On my MacOS 12.4 is Python pre-installed, in the version Python 3.8.9. I did nothing for that, neither changed pathes.
If I run a Python script, which needs some modules with import requests
or from bs4 import BeautifulSoup
, I get errors ModuleNotFoundError: No module named ...
- all modules are affected.
But, if I install same modules with pip3 install bs4
, modules are installed correctly.
What should I change in scripts or Python settings so, that scripts can import modules on usual way?
/usr/bin/pip3 install bs4
started /usr/bin/python3 and in thatfrom bs4 import BeautifulSoup
and it worked. import requests failed - which is expected as what package is requests? Also where is your pip3