statgen / pheweb

A tool to build a website to browse hundreds or thousands of GWAS.
MIT License
154 stars 65 forks source link

Installation Problem #221

Closed xuxiny17 closed 3 months ago

xuxiny17 commented 3 months ago

I currently have a problem installing the PheWeb package on my Mac. The versions of the hardware and software are below

Mac Apple M2 chip macOS Sonoma Version 14.4 Beta Python 3.8.18 Platform: osx-arm64

No matter what I do, I always have the following errors, I tried to upgrade, and downgrade Python and wheel; greenlet; gevent packages and none of them helped, it always generates the following errors:

  src/gevent/greenlet.c:5500:27: error: no member named 'parent' in 'struct _greenlet'
    __pyx_t_1 = (__pyx_v_s->parent != NULL);
                 ~~~~~~~~~  ^
  src/gevent/greenlet.c:5511:42: error: no member named 'parent' in 'struct _greenlet'
      __Pyx_INCREF(((PyObject *)__pyx_v_s->parent));
                                ~~~~~~~~~  ^
  ./src/gevent/_generated_include/Refnanny_proto_5324c7266766d5891ee9dd66731059ef4d92e8ea.h:55:37: note: expanded from macro '__Pyx_INCREF'
    #define __Pyx_INCREF(r) Py_INCREF(r)
                                      ^
  /Users/xxx/anaconda3/include/python3.8/object.h:462:49: note: expanded from macro 'Py_INCREF'
  #define Py_INCREF(op) _Py_INCREF(_PyObject_CAST(op))
                                                  ^~
  /Users/xxx/anaconda3/include/python3.8/object.h:111:41: note: expanded from macro '_PyObject_CAST'
  #define _PyObject_CAST(op) ((PyObject*)(op))
                                          ^~
  src/gevent/greenlet.c:5512:39: error: no member named 'parent' in 'struct _greenlet'
      __pyx_r = ((PyObject *)__pyx_v_s->parent);
                             ~~~~~~~~~  ^
  src/gevent/greenlet.c:5564:27: error: no member named 'parent' in 'struct _greenlet'
    __pyx_t_1 = (__pyx_v_s->parent != NULL);
                 ~~~~~~~~~  ^
  src/gevent/greenlet.c:5575:44: error: no member named 'parent' in 'struct _greenlet'
      if (!(likely(((((PyObject *)__pyx_v_s->parent)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_s->parent), __pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop))))) __PYX_ERR(4, 45, __pyx_L1_error)
                                  ~~~~~~~~~  ^
  src/gevent/greenlet.c:1445:43: note: expanded from macro 'likely'
    #define likely(x)   __builtin_expect(!!(x), 1)
                                            ^
  src/gevent/greenlet.c:5575:114: error: no member named 'parent' in 'struct _greenlet'
      if (!(likely(((((PyObject *)__pyx_v_s->parent)) == Py_None) || likely(__Pyx_TypeTest(((PyObject *)__pyx_v_s->parent), __pyx_ptype_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop))))) __PYX_ERR(4, 45, __pyx_L1_error)
                                                                                                        ~~~~~~~~~  ^
  src/gevent/greenlet.c:1445:43: note: expanded from macro 'likely'
    #define likely(x)   __builtin_expect(!!(x), 1)
                                            ^
  src/gevent/greenlet.c:1445:43: note: expanded from macro 'likely'
    #define likely(x)   __builtin_expect(!!(x), 1)
                                            ^
  src/gevent/greenlet.c:5576:42: error: no member named 'parent' in 'struct _greenlet'
      __Pyx_INCREF(((PyObject *)__pyx_v_s->parent));
                                ~~~~~~~~~  ^
  ./src/gevent/_generated_include/Refnanny_proto_5324c7266766d5891ee9dd66731059ef4d92e8ea.h:55:37: note: expanded from macro '__Pyx_INCREF'
    #define __Pyx_INCREF(r) Py_INCREF(r)
                                      ^
  /Users/xxx/anaconda3/include/python3.8/object.h:462:49: note: expanded from macro 'Py_INCREF'
  #define Py_INCREF(op) _Py_INCREF(_PyObject_CAST(op))
                                                  ^~
  /Users/xxx/anaconda3/include/python3.8/object.h:111:41: note: expanded from macro '_PyObject_CAST'
  #define _PyObject_CAST(op) ((PyObject*)(op))
                                          ^~
  src/gevent/greenlet.c:5577:126: error: no member named 'parent' in 'struct _greenlet'
      __pyx_r = ((struct __pyx_obj_6gevent_29_gevent_c_greenlet_primitives_SwitchOutGreenletWithLoop *)((PyObject *)__pyx_v_s->parent));
                                                                                                                    ~~~~~~~~~  ^
  src/gevent/greenlet.c:9671:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
      #pragma GCC diagnostic pop
                             ^
  src/gevent/greenlet.c:12642:26: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
    #pragma GCC diagnostic pop
                           ^
  src/gevent/greenlet.c:15466:28: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
      #pragma GCC diagnostic pop
                             ^
  src/gevent/greenlet.c:15988:32: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
          #pragma GCC diagnostic pop
                                 ^
  src/gevent/greenlet.c:16048:32: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
          #pragma GCC diagnostic pop
                                 ^
  src/gevent/greenlet.c:16091:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
        #pragma GCC diagnostic pop
                               ^
  src/gevent/greenlet.c:16117:32: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas]
          #pragma GCC diagnostic pop
                                 ^
  7 warnings and 8 errors generated.
  error: command '/usr/bin/gcc' 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 gevent Failed to build gevent ERROR: Could not build wheels for gevent, which is required to install pyproject.toml-based projects

I have been trying to solve this problem for a few weeks, and the problem persists, may I ask if there is a way to solve this? Thank you so much!

pjvandehaar commented 3 months ago

Are you able to “pip3 install gevent”, without pheweb? If not, you should report the error to that project.

Pheweb can work without gevent, greenlet, and gunicorn. I think there's a way to tell pip to not install those. Anyways, if you're running on a Mac there's not as much need for them.

xuxiny17 commented 3 months ago

Yes, “pip3 install gevent” works without errors, and the wheel installation works fine too, I tried both of those packages with the latest version, I also tried with "pip3 install greenlet==3.0" and "pip3 install greenlet==3.0.1", both of them worked fine.

There is always an error: "Could not build wheels for gevent, which is required to install pyproject.toml-based projects", and I also installed pyproject, may I ask if there is a way to install pheweb without terminal?

pjvandehaar commented 3 months ago

Pheweb is only installable via terminal, sorry.

I recommend you find a way to install pheweb without gevent. I think there's an exclude option in pip.

xuxiny17 commented 3 months ago

Sure! I would look for the code at once, thank you so much for the help! And I would report there once I ran the code.

xuxiny17 commented 3 months ago

I successfully installed using the code: pip install --no-deps pheweb, but I noticed the following

pheweb 1.3.16 requires boltons~=20.2, but you have boltons 23.0.0 which is incompatible.
pheweb 1.3.16 requires Flask~=1.1, but you have flask 2.2.5 which is incompatible.
pheweb 1.3.16 requires gevent~=21.1, but you have gevent 24.2.1 which is incompatible.

May I ask if these errors would interfere with the package when I run pheweb? I ran the code: pheweb phenolist glob --star-is-phenocode "/Users/xxx/Desktop/my-new-pheweb/*.gz" and pheweb conf both without errors.

pjvandehaar commented 3 months ago

It should be fine. If you get errors when serve the pheweb, run "pip3 install flask==1.1".

xuxiny17 commented 3 months ago

Sure! Thank you so much! That solved my problem. Have a great day!