Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Not installing on Mac #681

Open
1 of 2 tasks
advik-student-dev opened this issue Feb 18, 2022 · 9 comments
Open
1 of 2 tasks

[Bug]: Not installing on Mac #681

advik-student-dev opened this issue Feb 18, 2022 · 9 comments
Assignees
Labels
Bug / Error Something isn't working

Comments

@advik-student-dev
Copy link

Duplicate Issues

  • 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 advik-student-dev added the Bug / Error Something isn't working label Feb 18, 2022
@Kurdakov
Copy link

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 #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
Copy link

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

@fluentmoheshwar
Copy link

run pip3 install python-Levenshtein

@rachmadaniHaryono
Copy link

non mac user here

op already made issue ztane/python-Levenshtein#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

ztane/python-Levenshtein#61

@TechStudent10
Copy link
Contributor

TechStudent10 commented Feb 28, 2022

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

@Jimbolino
Copy link
Contributor

had same issue on ubuntu:

#720

@rachmadaniHaryono
Copy link

rachmadaniHaryono commented Mar 6, 2022

@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

@Jimbolino
Copy link
Contributor

@rachmadaniHaryono i've created a new issue, because the error message is about the same Levenshtein package, but the solution is probably not :)
#721

@maxbachmann
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug / Error Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants