Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install a plugin because cannot invoke pip #1539

Open
2 tasks done
philipmw opened this issue Nov 3, 2023 · 1 comment
Open
2 tasks done

Can't install a plugin because cannot invoke pip #1539

philipmw opened this issue Nov 3, 2023 · 1 comment
Labels
awaiting-response bug Something isn't working low-priority We'll be happy to work on the issue, but it is low on the priority list. PRs welcome

Comments

@philipmw
Copy link

philipmw commented Nov 3, 2023

Checklist

  • I've searched for similar issues.
  • I'm using the latest version of HTTPie.

Minimal reproduction code and steps

  1. Run httpie --debug --traceback cli plugins install ~/any/local/path/that-may-not-even-exist

Current result

% httpie --debug --traceback cli plugins install ~/aaaaa
HTTPie 3.2.2
Requests 2.31.0
Pygments 2.16.1
Python 3.12.0 (main, Oct  2 2023, 12:03:24) [Clang 15.0.0 (clang-1500.0.40.1)]
/usr/local/Cellar/httpie/3.2.2_3/libexec/bin/python
Darwin 23.1.0

<Environment {'apply_warnings_filter': <function Environment.apply_warnings_filter at 0x1107f3c40>,
 'args': Namespace(),
 'as_silent': <function Environment.as_silent at 0x1107f3b00>,
 'colors': 256,
 'config': {'default_options': []},
 'config_dir': PosixPath('/Users/pmw/.config/httpie'),
 'devnull': <property object at 0x1107e9850>,
 'is_windows': False,
 'log_error': <function Environment.log_error at 0x1107f3ba0>,
 'program_name': 'httpie',
 'quiet': 0,
 'rich_console': <functools.cached_property object at 0x1107e3290>,
 'rich_error_console': <functools.cached_property object at 0x1107e32f0>,
 'show_displays': True,
 'stderr': <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>,
 'stderr_isatty': True,
 'stdin': <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>,
 'stdin_encoding': 'utf-8',
 'stdin_isatty': True,
 'stdout': <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>,
 'stdout_encoding': 'utf-8',
 'stdout_isatty': True}>

<PluginManager {'adapters': [],
 'auth': [<class 'httpie.plugins.builtin.BasicAuthPlugin'>,
          <class 'httpie.plugins.builtin.DigestAuthPlugin'>,
          <class 'httpie.plugins.builtin.BearerAuthPlugin'>],
 'converters': [],
 'formatters': [<class 'httpie.output.formatters.headers.HeadersFormatter'>,
                <class 'httpie.output.formatters.json.JSONFormatter'>,
                <class 'httpie.output.formatters.xml.XMLFormatter'>,
                <class 'httpie.output.formatters.colors.ColorFormatter'>]}>
Installing /Users/pmw/aaaaa...
Command failed: pip install --prefer-binary --prefix=/Users/pmw/.config/httpie/plugins --no-warn-script-location /Users/pmw/aaaaa
  Can't install '/Users/pmw/aaaaa'

Me trying to debug the issue:

% pip
zsh: command not found: pip

Based on the HTTPie source code, it appears to be doing this:

% python3.12
Python 3.12.0 (main, Oct  2 2023, 12:03:24) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import shutil
>>> shutil.which("pip")
>>> shutil.which("pip3")
'/usr/local/bin/pip3'
>>>

This works as expected.

Expected result

It finds pip3 (which does exist) and uses it.


Debug output

(already provided above)

@philipmw philipmw added bug Something isn't working new Needs triage. Comments are welcome! labels Nov 3, 2023
@Ousret

This comment was marked as spam.

@Ousret Ousret added low-priority We'll be happy to work on the issue, but it is low on the priority list. PRs welcome awaiting-response and removed new Needs triage. Comments are welcome! labels May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response bug Something isn't working low-priority We'll be happy to work on the issue, but it is low on the priority list. PRs welcome
Projects
None yet
Development

No branches or pull requests

2 participants