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

Error when pip install on MacOS #99

Closed
xcTorres opened this issue Nov 26, 2021 · 7 comments · Fixed by #102
Closed

Error when pip install on MacOS #99

xcTorres opened this issue Nov 26, 2021 · 7 comments · Fixed by #102
Labels
bug Something isn't working

Comments

@xcTorres
Copy link

xcTorres commented Nov 26, 2021

Collecting symspellpy
Using cached symspellpy-6.7.2-py3-none-any.whl (2.6 MB)
Collecting editdistpy==0.1.1
Using cached editdistpy-0.1.1.tar.gz (7.2 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: editdistpy
Building wheel for editdistpy (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: python /Users/chong.xie/anaconda3/envs/poi/lib/python3.6/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /var/folders/lc/qhxc24_x08768928cycjn64wdky3nh/T/tmpqtq9mltn
cwd: /private/var/folders/lc/qhxc24_x08768928cycjn64wdky3nh/T/pip-install-ntse93wr/editdistpy_8f379bfb4b4648408d489c6afecce03d
Complete output (5 lines):
running bdist_wheel
running build
running build_ext
building 'editdistpy.levenshtein' extension
error: unknown file type '.pyx' (from 'editdistpy/levenshtein.pyx')

ERROR: Failed building wheel for editdistpy

@xcTorres
Copy link
Author

Install successfully on version 6.7.0

@mammothb
Copy link
Owner

mammothb commented Nov 27, 2021

@xcTorres I think this happened because I failed to configure editdistpy properly for systems that cannot install via prebuilt wheels, sorry about that. I have made some changes to the package configuration, could you please try the following command

pip install -U symspellpy==6.7.3 --no-cache-dir

and let me know the results? Thank you!

@mammothb mammothb added the bug Something isn't working label Nov 27, 2021
@xcTorres
Copy link
Author

Sorry, still cannot work. But when I use the following command it works.

CFLAGS='-stdlib=libc++' pip install -U symspellpy==6.7.3 --no-cache-dir

@mammothb
Copy link
Owner

Looks like an extra compiler flag is required on some macOS version. If you don't mind, could you try and install just editdistpy==v0.1.3rc1 to see if it can install without the extra flags (I added the extra flag for macOS into its setup script)?

pip install -U editdistpy==0.1.3rc1 --no-cache-dir

And may I know which macOS version are you running? So that other users who encounter similar problem can find your solution. Thanks!

@xcTorres
Copy link
Author

My Mac version: 10.15.7

I am not able to install editdispy using "pip install -U editdistpy==0.1.3rc1 --no-cache-dir", here is the error.

  In file included from editdistpy/levenshtein.cpp:656:
  In file included from editdistpy/_levenshtein.hpp:4:
  editdistpy/def.hpp:10:10: fatal error: 'cstdint' file not found
  #include <cstdint>
           ^~~~~~~~~
  1 error generated.
  python3.7/distutils/extension.py:131: UserWarning: Unknown Extension options: 'extra_compiler_args'
    warnings.warn(msg)
  error: command 'gcc' failed with exit status 1

  ERROR: Failed building wheel for editdistpy
  Running setup.py clean for editdistpy
Failed to build editdistpy

@mammothb
Copy link
Owner

I made some more changes to the build, could you please try this

pip install -U editdistpy==0.1.3rc3 --no-cache-dir

and see if it's able to install?

@xcTorres
Copy link
Author

xcTorres commented Nov 29, 2021

It works. Thanks

@mammothb mammothb linked a pull request Nov 29, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants