I have both Python 2 and Python 3 installed on my MacOS (Mojave 10.14.5). When I run my Python 2 code I get:
ImportError: No module named <modulename>
if I install the module with pip install <modulename>
command i get:
Requirement already satisfied: <modulename> in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (0.5)
Then same missing package message as before when running the code with Python 2. The command pip2 install <modulename>
is not working. How could I install modules for Python 2?