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

Using pipx to install JMESPath Terminal, jpterm #936

Closed
chriscroome opened this issue Feb 9, 2023 · 2 comments
Closed

Using pipx to install JMESPath Terminal, jpterm #936

chriscroome opened this issue Feb 9, 2023 · 2 comments

Comments

@chriscroome
Copy link

In the past I've been able to install JMESPath Terminal using Ansible and PIP, for example:

---
- name: JMESPath Terminal present
  block:

    # https://github.com/jmespath/jmespath.terminal/issues/19#issuecomment-1156039074
    - name: Use pip to install an old version of setuptools
      ansible.builtin.pip:
        name: setuptools==57
        state: present

    - name: Use pip to install jpterm
      ansible.builtin.pip:
        name: jmespath-terminal
        state: present

  when: jp_term | bool

However Debian Bookworm is not going to allow this:

python-pip (23.0+dfsg-1) unstable; urgency=medium

This version of pip introduces PEP 668 support. Debian's python3.11 interpreter will soon (>= 3.11.1-3) declare the installation to be EXTERNALLY-MANAGED, instructing pip to disallow package installation outside virtualenvs.

See: https://peps.python.org/pep-0668/

Practically, this means that you can't use pip to install packages outside a virtualenv, on a Debian system, any more.

So I'm looking to update everything to use pipx, however I can't see how to install setuptools==57 and then jmespath-terminal into a venv, is this possible?

@chriscroome
Copy link
Author

Answering my own question…

pipx install jmespath
  installed package jmespath 1.0.1, installed using Python 3.11.2
  These apps are now globally available
    - jp.py
done! ✨ 🌟 ✨
pipx inject jmespath setuptools==57
  injected package setuptools into venv jmespath
done! ✨ 🌟 ✨
pipx inject jmespath jmespath-terminal
  injected package jmespath-terminal into venv jmespath
done! ✨ 🌟 ✨

However with python3.11 on Debian Bookworm it doesn't work, but this is a jmespath-terminal issues not a pipx one so I'm closing this.

@chriscroome chriscroome closed this as not planned Won't fix, can't repro, duplicate, stale Feb 23, 2023
@chriscroome
Copy link
Author

The answer to this problem, for Debian Bookworm, is to use the community fork:

pipx install git+https://github.com/jmespath-community/[email protected]

@chriscroome chriscroome changed the title How to install a package with specific dependencies Using pipx to install JMESPath Terminal, jpterm Mar 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant