โ ~ http --help
์ญ์ถ์ (๊ฐ์ฅ ์ต๊ทผ ํธ์ถ ๋ง์ง๋ง):
ํ์ผ "/usr/local/Cellar/httpie/0.9.4/libexec/bin/http", 5ํ,
pkg_resources์์ load_entry_point ๊ฐ์ ธ์ค๊ธฐ
ImportError: 'pkg_resources'๋ผ๋ ๋ชจ๋์ด ์์ต๋๋ค.
์ถฉ๋
@badjano ์ด์ ๋ฒ์ ์ ๋๋ค. ๋ ธ๋ ฅํ๋ค:
$ brew update && brew upgrade httpie
์ญ์ถ์ (๊ฐ์ฅ ์ต๊ทผ ํธ์ถ ๋ง์ง๋ง):
ํ์ผ "/usr/local/Cellar/httpie/0.9.6/libexec/bin/http", 5ํ,
pkg_resources์์ load_entry_point ๊ฐ์ ธ์ค๊ธฐ
ImportError: 'pkg_resources'๋ผ๋ ๋ชจ๋์ด ์์ต๋๋ค.
๋๋ ๊ฐ์ Mac์ ๊ฐ์ง๊ณ ์๋ ๋๋ฃ๊ฐ ์์ง๋ง ๊ทธ์ ์์ ์ ํ๊ณ ์์ต๋๋ค. ์ ๋ python, pip, setuptools, brew upgrade, ๋ชจ๋ ๊ฒ์ ๋ค์ ์ค์นํ์ง๋ง ์ฌ์ ํ ๋ฌด์จ ์ผ์ด ์ผ์ด๋๊ณ ์๋์ง ์ ์ ์์ต๋๋ค
๋๋ ๋ฐฉ๊ธ ์ด๊ฒ์ ๋ถ๋ช์ณค๋ค. ์ค์น ์ค๋ฅ๋ฅผ ๋ณด๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
==> Installing dependencies for httpie: python3
==> Installing httpie dependency: python3
==> Downloading https://homebrew.bintray.com/bottles/python3-3.5.2_1.el_capitan.bottle.2.tar.gz
######################################################################## 100.0%
==> Pouring python3-3.5.2_1.el_capitan.bottle.2.tar.gz
==> Using the sandbox
==> /usr/local/Cellar/python3/3.5.2_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python3/3.5.2_1/bin --install-lib=/usr/local/lib/python3.5/site-pa
Last 15 lines from /Users/jsheeley/Library/Logs/Homebrew/python3/post_install.01.python3:
-s
setup.py
--no-user-cfg
install
--force
--verbose
--install-scripts=/usr/local/Cellar/python3/3.5.2_1/bin
--install-lib=/usr/local/lib/python3.5/site-packages
--single-version-externally-managed
--record=installed.txt
Failed to import the site module
Your PYTHONPATH points to a site-packages dir for Python 2.x but you are running Python 3.x!
PYTHONPATH is currently: "/Library/Python/2.7/site-packages:/usr/local/lib/python2.7/site-packages:/Users/jsheeley/.venvburrito/lib/python2.7/site-packages"
You should `unset PYTHONPATH` to fix this.
Warning: The post-install step did not complete successfully
You can try again using `brew postinstall python3`
==> Caveats
Pip, setuptools, and wheel have been installed. To update them
pip3 install --upgrade pip setuptools wheel
... (etc)
์์ ํ๊ธฐ ์ํด ๋ค์์ ์คํํ์ต๋๋ค.
โ unset PYTHONPATH
โ brew postinstall python3
๊ทธ๋ฐ ๋ค์ httpie๋ฅผ ์๋ํ์ญ์์ค.
โ http google.com
HTTP/1.1 301 Moved Permanently
Cache-Control: public, max-age=2592000
Content-Length: 219
Content-Type: text/html; charset=UTF-8
Date: Fri, 23 Sep 2016 04:34:37 GMT
Expires: Sun, 23 Oct 2016 04:34:37 GMT
Location: http://www.google.com/
Server: gws
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
python3์ ์ฌ๋ฐ๋ฅด๊ฒ ์ค์นํ๋ฉด ์๋ํฉ๋๋ค(PYTHONPATH๋ฅผ ์ด์ ๊ฐ์ผ๋ก ์ค์ ํ ๊ฒฝ์ฐ์๋).
brew์ ์ต๊ทผ 1.0.0 ๋ฆด๋ฆฌ์ค์์๋ ์ด๊ฒ์ด ๋ณตํฉ์ ์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค. ์ด๊ฒ์ ์ ๋ฅผ ์ํด ๋ง์ ํ์ด์ฌ ์ฌํญ์ ๋ณ๊ฒฝํ ๊ฒ์ผ๋ก ๋ณด์ด๋ฉฐ ์ฌ๋ฌ ํจํค์ง๋ฅผ ๋ค์ ์ค์นํด์ผ ํ์ต๋๋ค.
@sheeley ๊ฐ์ฌํฉ๋๋ค. ๋น๋ก ๋ด python3์ด ์ฐ๊ฒฐ๋์ง ์์๊ณ ๊ฐ์ ๋ก ์ ๊ฑฐํ๊ณ ๋ค์ ์ค์นํ๊ธฐ๋ก ๊ฒฐ์ ํ์ง๋ง ์ด์ ์๋ํฉ๋๋ค!
์ด๊ฒ์ npm์ 3.10.10์์ 4.0.5๋ก ์
๊ทธ๋ ์ด๋ํ ํ์ ๋ฐ์ํ์ต๋๋ค. @sheeley ์๋ฃจ์
์ ์๋ํ์ง๋ง ์๋ํ์ง ์์์ต๋๋ค. ๋ด ์์ ์ brew uninstall httpie
๋ค์ brew install httpie
์ด์์ต๋๋ค. ์ด์ ์ ์์ผ๋ก ๋์์์ต๋๋ค. ์ฐธ๊ณ ๋ก ์ด๊ฒ์ macOS 10.9.5๋ฅผ ์คํํ๋ ๋ด MacBook Pro(2011๋
์ด)์ ์์์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๋๋ ๋ฐฉ๊ธ ์ด๊ฒ์ ๋ถ๋ช์ณค๋ค. ์ค์น ์ค๋ฅ๋ฅผ ๋ณด๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
์์ ํ๊ธฐ ์ํด ๋ค์์ ์คํํ์ต๋๋ค.
๊ทธ๋ฐ ๋ค์ httpie๋ฅผ ์๋ํ์ญ์์ค.
python3์ ์ฌ๋ฐ๋ฅด๊ฒ ์ค์นํ๋ฉด ์๋ํฉ๋๋ค(PYTHONPATH๋ฅผ ์ด์ ๊ฐ์ผ๋ก ์ค์ ํ ๊ฒฝ์ฐ์๋).
brew์ ์ต๊ทผ 1.0.0 ๋ฆด๋ฆฌ์ค์์๋ ์ด๊ฒ์ด ๋ณตํฉ์ ์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค. ์ด๊ฒ์ ์ ๋ฅผ ์ํด ๋ง์ ํ์ด์ฌ ์ฌํญ์ ๋ณ๊ฒฝํ ๊ฒ์ผ๋ก ๋ณด์ด๋ฉฐ ์ฌ๋ฌ ํจํค์ง๋ฅผ ๋ค์ ์ค์นํด์ผ ํ์ต๋๋ค.