This is a quick guide on installing HTTPie for Mac OS X systems. This is also useful if you want the python package management utility pip. An installed copy of Homebrew is a prerequisite.
brew install httpie# install the python package provided with homebrew
brew install python
# install HTTPie with the pip utility
pip install httpie
# add the shared python folder to your path
nano ~/.bash_profile
# Add the following line to your ~/.bash_profile
export PATH=/usr/local/share/python:$PATH
# open a new terminal and give it a go
http ifconfig.me/all.json
My goal is to install HTTPie manually. I'm running OS X El Capitan 10.11.6
If I run
which pipI get no response. If I runwhich pip3I get:/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3If I run
python --versionI getPython 2.7.10If I run
which pythonI get/usr/bin/pythonI assume this is from installing Xcode.If I run
which python3I get/Library/Frameworks/Python.framework/Versions/3.6/bin/python3I installed PyCharm Edu and I am fairly certain it runs the Python 3.6 version. I also assume via this installation, my .bash_profile was given the following:
# Setting PATH for Python 3.6# The original version is saved in .bash_profile.pysavePATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" export PATHMy goal is to use HTTPie to run with Node if that helps. Should I run
pip3 install httpieand follow the rest of the directions, or should I install a version of pip to my 2.7.10 version?