PaulBone / gfthings

Paul's Gridfinity Things
6 stars 0 forks source link

Unable to install gfthings on MacOS 14.5 #1

Open ebuster opened 3 months ago

ebuster commented 3 months ago

Hi,

I installed pipx using Homebrew:

> python3 --version
Python 3.12.4

> pipx --version
1.6.0

Then trying to install gfthings:

> pipx install gfthings
Fatal error from pip prevented installation. Full pip output in file:
    /Users/user/.local/pipx/logs/cmd_2024-06-30_14.57.16_pip_errors.log

pip seemed to fail to build package:
    build123d<0.6.0,>=0.5.0

Some possibly relevant errors from pip install:
    ERROR: Could not find a version that satisfies the requirement cadquery-ocp>=7.7.0 (from build123d) (from versions: none)
    ERROR: No matching distribution found for cadquery-ocp>=7.7.0

Error installing gfthings.

Log file content:

PIP STDOUT
----------
Collecting gfthings
  Using cached gfthings-0.1.0-py3-none-any.whl.metadata (4.2 kB)
Collecting build123d<0.6.0,>=0.5.0 (from gfthings)
  Using cached build123d-0.5.0-py3-none-any.whl.metadata (3.8 kB)
INFO: pip is looking at multiple versions of build123d to determine which version is compatible with other requirements. This could take a while.

PIP STDERR
----------
ERROR: Could not find a version that satisfies the requirement cadquery-ocp>=7.7.0 (from build123d) (from versions: none)
ERROR: No matching distribution found for cadquery-ocp>=7.7.0

What I am doing wrong? I tried to google solution but no success, sorry.

smos08 commented 2 weeks ago

i just found this repo and was very excited (since i love his grids) to see this generator. i ran into the same issue and im going to assume you are running this on an apple silicon ( M1 or above) mac vs intel which may be why you are seeing this. if that is the case and you are comfortable using docker i have created a docker file that you can build that will let you run it. i did go down some rabbit holes about potentially getting the cadquery-ocp installed on an arm based system using conda but docker makes it easy so that is the route i went


FROM --platform=linux/amd64 python:3.12-slim

RUN apt-get update && \
    apt-get -y --no-install-recommends install \
        pipx \
        libgl1 \
        libglib2.0-0

RUN pipx install gfthings && pipx ensurepath

WORKDIR /root
ebuster commented 2 weeks ago

@smos08, you are right - I have M1. Docker is not my passion, but as minimum now I know how to deal with that. Thank you very much!

jdegenstein commented 2 weeks ago

An alternative is that you can pip install cadquery-ocp manually by just pasting the link from this github release https://github.com/CadQuery/ocp-build-system/releases/tag/7.7.2.0

This way you don't have to use conda or docker if you don't want to on an m1/2/3/+ mac machine.