yeicor-3d/yet-another-cad-viewer

Not able to install

h3n3b0sch opened this issue · 2 comments

I'm trying to install and get some remarks about not having the right software and an error without installation.

What I did:

  • I setup Ubuntu Server 24.04 as a VM in QEMU and logged in as a standard user
  • git clone https://github.com/yeicor-3d/yet-another-cad-viewer.git
  • cd yet-another-cad-viewer/
  • python -m venv venv It then complained not having python. Do you want to use python3? Or install deb python-is-python3. I did the latter.
  • sudo apt install python-is-python3
  • I ran the command python -m venv venv again and it complained not having python-venv so I installed it with:
  • sudo apt install python3.12-venv
  • I ran the command python -m venv venv again
  • then pip install -r requirements.txt
  • this gives:
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.

What should be xyz that has to be installed? What am I missing?

h3n3

P.S. It would be nice to have a complete install guide with the requirements needed and with the procedure how to use it.

I think I found a solution about the install...
Start the environment first, before pip install requirements.txt
So:

  • sudo apt install python-is-python3
  • sudo apt install python3.XX-venv where XX is the python version you are using
  • sudo apt install git-all
  • git clone https://github.com/yeicor-3d/yet-another-cad-viewer.git
  • cd yet-another-cad-viewer/
  • python -m venv .venv
  • source .venv/bin/activate
  • cd example/
  • pip install -r requirements.txt
    Now it installs.

I have to mention that I did a build123d install before this, which at first gave me the same errors. It seems it is crucial to be in the virtual environment before installing.

h3n3

Hey there, sorry for the mix-up with the installation instructions. My bad for forgetting to mention the activation of the environment before running pip install -r requirements.txt. It's all sorted out now though. Thanks for opening this issue and I hope this viewer works out for you!

P.S. I skipped adding instructions for installing python and venv since they can differ depending on your system, but I've made it clear that Python 3 is needed.