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 pip
I get no response. If I runwhich pip3
I get:/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3
If I run
python --version
I getPython 2.7.10
If I run
which python
I get/usr/bin/python
I assume this is from installing Xcode.If I run
which python3
I get/Library/Frameworks/Python.framework/Versions/3.6/bin/python3
I 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.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" export PATH
My goal is to use HTTPie to run with Node if that helps. Should I run
pip3 install httpie
and follow the rest of the directions, or should I install a version of pip to my 2.7.10 version?