YT-Spammer-Purge icon indicating copy to clipboard operation
YT-Spammer-Purge copied to clipboard

[Bug]: Not installing on Mac

Open advik-student-dev opened this issue 3 years ago • 9 comments

Duplicate Issues

  • [X] There are no existing posts relating to my problem
  • [ ] There are existing posts relating to my problem, but the solution given, doesn't work for me.

What happened?

after running "pip3 install -r requirements.txt", it errors out on a package called python-Levenshtein. I believe there is a problem with the package itself as I tried to install it separately and it failed. can you fix this.

OS - macOS Monterey 12.1 Laptop - MacBook Air 2017

Release version

v2.16

Steps to reproduce

  1. download zip
  2. unzip the .zip file
  3. open the folder in terminal
  4. run "pip3 install -r requirements.txt"

Tried out multiple times, error happened every time. I even reinstall python3 so I don't believe it's a problem with pip or python. Just a problem with the package itself (python-Levenshtein) (referenced from the error message)

What platform are you seeing this problem on?

MacOS

Relevant log output

102 warnings generated.
      clang -bundle -undefined dynamic_lookup -arch arm64 -arch x86_64 -g -L/usr/local/opt/icu4c/lib set -gx CPPFLAGS -I/usr/local/opt/icu4c/include build/temp.macosx-10.9-universal2-3.10/Levenshtein/_levenshtein.o -o build/lib.macosx-10.9-universal2-3.10/Levenshtein/_levenshtein.cpython-310-darwin.so
      clang: error: unknown argument: '-gx'
      clang: error: no such file or directory: 'set'
      clang: error: no such file or directory: 'CPPFLAGS'
      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: legacy-install-failure

× Encountered error while trying to install package.
╰─> python-Levenshtein

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Screenshots

No response

advik-student-dev avatar Feb 18 '22 10:02 advik-student-dev

that's strange (because it somehow asks to build for arm too see -arch arm64, not sure why )

but possibly installing gcc and compiling from source would help (maybe just running from source https://pypi.org/project/python-Levenshtein/#files python3 setup.py build python3 setup.py install will do the trick if not see below)

from https://github.com/ThioJoe/YT-Spammer-Purge/issues/523 download source code https://pypi.org/project/python-Levenshtein/#files install gcc I guess, install python3-develop (maybe not needed) brew install python3-develop python3 setup.py build python setup.py install (maybe prefix with sudo: sudo python3 setup.py install )

Kurdakov avatar Feb 18 '22 19:02 Kurdakov

btw it is not common problem, there are mac screenshots successfully running script (after python Levenshtein was added as dependency), so you have to find what is specifically wrong with your setup

Kurdakov avatar Feb 19 '22 18:02 Kurdakov

run pip3 install python-Levenshtein

fluentmoheshwar avatar Feb 22 '22 12:02 fluentmoheshwar

non mac user here

op already made issue https://github.com/ztane/python-Levenshtein/issues/81

try remove python-Levenshtein>=0.12.2with levenshtein on requirements.txt

and try run the program

levenshtein is fork of python-levenshtein so i assume everything should work as before

if you success create pr to replace the package

see also

https://github.com/ztane/python-Levenshtein/issues/61

rachmadaniHaryono avatar Feb 22 '22 12:02 rachmadaniHaryono

I was about to suggest trying to run under Rosetta, but seeing that you are using an Air from 2017, it's probably a Monterey bug.

According to Wikipedia, the latest version is 12.2.1. I would recommend upgrading to see if that fixes the bug, but seeing that Apple gives vague update descriptions (i.e Recommended bug fixes for most users), I'm not sure if that will fix the issue.

image

TechStudent10 avatar Feb 28 '22 23:02 TechStudent10

had same issue on ubuntu:

https://github.com/ThioJoe/YT-Spammer-Purge/pull/720

Jimbolino avatar Mar 06 '22 22:03 Jimbolino

@Jimbolino i'm on ubuntu 21.10 with python3.9 can install levenstein without problem

and also can you post full error text

e: your current error text little bit different than this one

rachmadaniHaryono avatar Mar 06 '22 22:03 rachmadaniHaryono

@rachmadaniHaryono i've created a new issue, because the error message is about the same Levenshtein package, but the solution is probably not :) https://github.com/ThioJoe/YT-Spammer-Purge/issues/721

Jimbolino avatar Mar 06 '22 23:03 Jimbolino

I believe this should be fixed in the current version, since it does no longer use python-Levenshtein

maxbachmann avatar Mar 20 '23 20:03 maxbachmann