quentintaranpino / nostrcheck-server

Nostr server for hosting media upload (NIP96 & Blossom), nostr address (NIP05), lightning redirects and much more.
https://nostrcheck.me/api/v2
MIT License
70 stars 15 forks source link

v0.6.0 standalone install ends with error: externally-managed-environment on Ubuntu 24.04 #28

Closed aidik closed 1 month ago

aidik commented 1 month ago

Describe the bug Running curl https://raw.githubusercontent.com/quentintaranpino/nostrcheck-api-ts/0.6.0/scripts/install.sh --output install.sh && chmod +x install.sh && ./install.sh results in error: externally-managed-environment during the Python Packages Install.

To Reproduce Steps to reproduce the behavior:

  1. Install Ubuntu 24.04 LTS Server
  2. Upgrade everything
  3. Run curl https://raw.githubusercontent.com/quentintaranpino/nostrcheck-api-ts/0.6.0/scripts/install.sh --output install.sh && chmod +x install.sh && ./install.sh
  4. Say YES to everything
  5. See the error during the "🐍 Installing Necessary Python Packages..." step

Expected behavior Smooth installation... I guess :-)

Screenshots

═══════════════════════════════════════════════════════════════════════════════
                 🐍 Installing Necessary Python Packages...
═══════════════════════════════════════════════════════════════════════════════

🔄 Installing packages from requirements.txt...

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.12/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.
❌ Failed to install Python packages from requirements.txt
quentintaranpino commented 1 month ago

I'll check it. Thanks for letting me know.

aidik commented 1 month ago

I'm observing the progress from a safe distance, but I had to try it. Now during the Python step, this error pops up, but it is pretty easy to deal with by just running apt install python3.12-venv.

═══════════════════════════════════════════════════════════════════════════════
        🐍 Creating Python virtual environment and installing packages
═══════════════════════════════════════════════════════════════════════════════

🔄 Creating virtual environment in .venv...
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt install python3.12-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: /root/nostrcheck-server/.venv/bin/python3.12
aidik commented 1 month ago

Also, the default Node.js version is 18. So, I think the script needs to add the required version 21+.

quentintaranpino commented 1 month ago

Hello, thank you for your comments. Could you try to install it now?

I think I've got something working 😊

Quentin

aidik commented 1 month ago

I installed void_cat_rs on the VPS in the meantime so I'm not able to test on the same machine, but I did try in a VM with Ubuntu Server 24.04.

Thank you @quentintaranpino

quentintaranpino commented 1 month ago

Thanks for your tests; you have helped me to better prepare the installer for the new version, even before completing it.

I encourage you to join the Telegram group, where we share updates on development and new versions.

https://t.me/nostrcheck

Quentin