nvbn / thefuck

Magnificent app which corrects your previous console command.
MIT License
83.75k stars 3.41k forks source link

Ubuntu 23.04 installation has issueswith installation #1374

Closed alekspickle closed 1 year ago

alekspickle commented 1 year ago

Not sure it's thefucks fault, but installation kinda broken on a newer Ubuntu

pip3 install thefuck --user
...
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-Debian-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 python3-full installed.

    If you wish to install a non-Debian 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.

    See /usr/share/doc/python3.11/README.venv for more information.

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.
alekspickle commented 1 year ago

nvm, new version broke the hell out of python

t0stiman commented 1 year ago

I have the same problem after upgrading to 23.04, how did you solve this?

alekspickle commented 1 year ago

Did not really solve, IIUC installation of python packages became hell of a lot harder for security reasons, so I just ditched all packages I installed with pip. You kinda have the choise to install pipx but after I tried I still get this error:


> fuck
Traceback (most recent call last):
  File "/usr/local/bin/fuck", line 5, in <module>
    from thefuck.entrypoints.not_configured import main
ModuleNotFoundError: No module named 'thefuck'
t0stiman commented 1 year ago

Deleting /usr/local/bin/fuck and then installing thefuck with pipx worked for me.