Phuks-co / throat

Open Source link aggregator and discussion platform powering Phuks
https://phuks.co
MIT License
74 stars 32 forks source link

Requirement.txt command giving error. #504

Closed vikky-noelle closed 2 years ago

vikky-noelle commented 2 years ago

After installing python when I execute the first command pip install -r requirements.txt I am getting the following error. I get that it is not installing the package, but why?


Running setup.py install for greenlet did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      running install
      /home/vikky/python-venv/new-py/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      building 'greenlet' extension
      creating build
      creating build/temp.linux-x86_64-3.10
      x86_64-linux-gnu-gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/vikky/python-venv/new-py/include -I/usr/include/python3.10 -c greenlet.c -o build/temp.linux-x86_64-3.10/greenlet.o
      greenlet.c: In function ‘g_calltrace’:
      greenlet.c:566:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
        566 |         tstate->use_tracing = 0;
            |                 ^~~~~~~~~~~
            |                 tracing
      greenlet.c:569:17: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘use_tracing’; did you mean ‘tracing’?
        569 |         tstate->use_tracing = (tstate->tracing <= 0 &&
            |                 ^~~~~~~~~~~
            |                 tracing
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  WARNING: No metadata found in /home/vikky/python-venv/new-py/lib/python3.10/site-packages
  Rolling back uninstall of greenlet
  Moving to /home/vikky/python-venv/new-py/include/site/python3.10/greenlet/
   from /home/vikky/python-venv/new-py/include/site/python3.10/~reenlet
  Moving to /home/vikky/python-venv/new-py/lib/python3.10/site-packages/greenlet-1.1.2.dist-info/
   from /home/vikky/python-venv/new-py/lib/python3.10/site-packages/~reenlet-1.1.2.dist-info
  Moving to /home/vikky/python-venv/new-py/lib/python3.10/site-packages/greenlet/
   from /home/vikky/python-venv/new-py/lib/python3.10/site-packages/~reenlet
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> greenlet

note: This is an issue with the package mentioned above, not pip.
globalistas commented 2 years ago

Have you tried a lesser Python version? I haven't seen this issue when I ran the command on Python 3.6.8

vikky-noelle commented 2 years ago

I have and it is working there, but the official doc says support for python3.6.8 is done. So I am trying to avoid running it an older version. Any suggestions? Or you suggest that I run it in python3.6 itself?

globalistas commented 2 years ago

Yeah, run in 3.6, or you may try going down from 3.10->3.9->etc. until you find a newer version that works.

Polsaker commented 2 years ago

Throat is tested to work well on Python 3.7. This error is probably due to a version mismatch.

Closing since it's not a Throat bug.