TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
9.61k stars 761 forks source link

install error #635

Open EinsPommes opened 2 weeks ago

EinsPommes commented 2 weeks ago

hello i have the error since yesterday it was already installed but it does not work anymore

sgpt
Traceback (most recent call last):
  File "/home/kali/.local/bin/sgpt", line 5, in <module>
    from sgpt import cli
ModuleNotFoundError: No module named 'sgpt'
pip install shell-gpt
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

    If you wish to install a non-Kali-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have pypy3-venv installed.

    If you wish to install a non-Kali-packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.

    For more information, refer to the following:
    * https://www.kali.org/blog/python-externally-managed/
    * /usr/share/doc/python3.12/README.venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
zx-ma commented 2 weeks ago

i just met a similar issue on arch linux. what i did is just use pipx to install shell-gpt and it works. (it seems pep 668 is preventing u from breaking system env)

EinsPommes commented 2 weeks ago

Ok thx but in a completely normal shell? So just do pipx?

Wikibear commented 1 week ago

Solution: pip3 install shell-gpt --break-system-packeges