mcfletch / pyopengl

Repository for the PyOpenGL Project
Other
329 stars 104 forks source link

Unable to install it on Mac M3 #117

Open ivanlen opened 5 months ago

ivanlen commented 5 months ago

I create a new virtual env and run pip install PyOpenGL-accelerate

I am having a very long error that ends like this:

  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/******/miniconda3/envs/p5/include -arch arm64 -fPIC -O2 -isystem /Users/******/miniconda3/envs/p5/include -arch arm64 -I/private/var/folders/8c/wl5hy01d5cl7zkcv10tbh9mw0000gn/T/pip-install-x0u1hj2p/pyopengl-accelerate_76fbaf79e96a40d9883390a037fbf561/src -I/private/var/folders/8c/wl5hy01d5cl7zkcv10tbh9mw0000gn/T/pip-install-x0u1hj2p/pyopengl-accelerate_76fbaf79e96a40d9883390a037fbf561 -I/private/var/folders/8c/wl5hy01d5cl7zkcv10tbh9mw0000gn/T/pip-build-env-9y99zaj_/overlay/lib/python3.10/site-packages/numpy/core/include -I/Users/******/miniconda3/envs/p5/include/python3.10 -c src/numpy_formathandler.c -o build/temp.macosx-11.1-arm64-cpython-310/src/numpy_formathandler.o
      In file included from src/numpy_formathandler.c:1251:
      In file included from /private/var/folders/8c/wl5hy01d5cl7zkcv10tbh9mw0000gn/T/pip-build-env-9y99zaj_/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/arrayobject.h:5:
      In file included from /private/var/folders/8c/wl5hy01d5cl7zkcv10tbh9mw0000gn/T/pip-build-env-9y99zaj_/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
      In file included from /private/var/folders/8c/wl5hy01d5cl7zkcv10tbh9mw0000gn/T/pip-build-env-9y99zaj_/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/ndarraytypes.h:1929:
      /private/var/folders/8c/wl5hy01d5cl7zkcv10tbh9mw0000gn/T/pip-build-env-9y99zaj_/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with "          "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
      #warning "Using deprecated NumPy API, disable it with " \
       ^
      src/numpy_formathandler.c:6434:42: warning: incompatible pointer types passing 'PyObject *' (aka 'struct _object *') to parameter of type 'PyArrayObject *' (aka 'struct tagPyArrayObject_fields *') [-Wincompatible-pointer-types]
          __pyx_v_res = PyArray_FillWithScalar(((PyObject *)__pyx_v_working), __pyx_v_instance);
                                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      src/numpy_formathandler.c:9826:3: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion]
        import_array();
        ^~~~~~~~~~~~~~
      /private/var/folders/8c/wl5hy01d5cl7zkcv10tbh9mw0000gn/T/pip-build-env-9y99zaj_/overlay/lib/python3.10/site-packages/numpy/core/include/numpy/__multiarray_api.h:1558:151: note: expanded from macro 'import_array'
      #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NULL; } }
                                                                                                                                                            ^~~~
      /Library/Developer/CommandLineTools/usr/lib/clang/15.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
      #  define NULL ((void*)0)
                     ^~~~~~~~~~
      2 warnings and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for PyOpenGL-accelerate

any idea?

adamsmatthew commented 2 months ago

This looks like the same issue as #107. I found a workaround and posted it over there: https://github.com/mcfletch/pyopengl/issues/107#issuecomment-2354537919.