Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upBrew installed version doesn't work with plugins #566
Comments
This comment has been minimized.
This comment has been minimized.
@rshurts you're right. Plugin installation for Homebrew-based installs doesn't work out of the box. There are advantages to keeping Homebrew as the recommended method, though. It makes updates easy and the main package can depend on Python 3 (improved SSL support, etc.). The ideal world solution would be to have all plugins available as Homebrew packages ( Using But plugins installed there won't survive HTTPie upgrades. Perhaps it would be possible to tweak the Homebrew formula to makeallow HTTPie load installed plugins from, for example, the Homebrew Python 3 …or some sort of custom plugin installer. |
This comment has been minimized.
This comment has been minimized.
In the meantime, maybe a note in the documentation around plugins saying "brew doesn't work with plugins and to pip install httpie for plugin functionality" would save some headaches. |
…not finding pip installed plugins (jakubroztocil#566).
This comment has been minimized.
This comment has been minimized.
There is also a problem with the read rights when user has no admin rights: $ http --help
Traceback (most recent call last):
File "/usr/local/bin/http", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3123, in <module>
@_call_aside
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3107, in _call_aside
f(*args, **kwargs)
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3136, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 569, in _build_master
ws = cls()
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 562, in __init__
self.add_entry(entry)
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 618, in add_entry
for dist in find_distributions(entry, True):
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1965, in find_on_path
for dist in factory(fullpath):
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2035, in distributions_from_metadata
root, entry, metadata, precedence=DEVELOP_DIST,
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2492, in from_location
py_version=py_version, platform=platform, **kw
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2867, in _reload_version
md_version = _version_from_file(self._get_metadata(self.PKG_INFO))
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2456, in _version_from_file
line = next(iter(version_lines), '')
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2646, in _get_metadata
for line in self.get_metadata_lines(name):
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1411, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1407, in get_metadata
value = self._get(self._fn(self.egg_info, name))
File "/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1519, in _get
with open(path, 'rb') as stream:
PermissionError: [Errno 13] Permission denied: '/usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/idna-2.7-py3.7.egg-info/PKG-INFO' I was able to fix it with chmod +r /usr/local/Cellar/httpie/1.0.0/libexec/lib/python3.7/site-packages/idna-2.7-py3.7.egg-info/PKG-INFO but switched to |
This comment has been minimized.
This comment has been minimized.
Since I upgraded to 10.14 Mojave I'm having the permissions error mentioned by @aheissenberger above. I have the same setup where I install homebrew using a local admin account but do normal operation in a standard account. I'm not a Python person and don't understand this discussion of plugins. I do not recall trying to add anything httpie beyond whatever comes as part of the homebrew formula. Is this fundamentally a Python3 problem (at least, Python as installed via homebrew)? Should I be reporting it to the maintainers? |
Brew is listed as the recommended way of installing httpie on macOS. However, it doesn't work with auth plugins.
For example, if you
pip3 install requests-hawk
and then runhttp --help
hawk will not show as an auth type. If youpip3 install httpie-oauth
it will install httpie via pip as a dependency and overwrite the brew installed link in/usr/local/bin/http
and now all the plugins will show because it isn't using the brew installed version.I suggest changing the documentation to read
pip3 install httpie
as the recommended method of installing on macOS.