Post

Install Package with pip for different Python version(Mac)

installing packages for different versions of python with pip

Sometime you will see errors saying packages are missing in a python version, the reason might be the package is not installed correctly using pip install or pip3 install, here is how to install the package for different python versions.

1
2
3
4
5
# use the system default python version
python -m pip install lxml

# specify which python to install the package
python3.6 -m pip install pandas

Now you can run either python test.py or python3 test.py.

This post is licensed under CC BY 4.0 by the author.