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

Can this package be compatible with MacOS M1 chip? #115

Closed
shakewingo opened this issue Jul 7, 2021 · 1 comment
Closed

Can this package be compatible with MacOS M1 chip? #115

shakewingo opened this issue Jul 7, 2021 · 1 comment

Comments

@shakewingo
Copy link

I've recently switched my Mac from x86_64 to arm64 while I am working on a project related to LDA topic modelling. I believe the new Mac currently only supports miniforge installation, therefore most packages can be installed via conda-forge/osx-arm64 channel or pip.

However this package can't be installed successfully.
Here's the error below via conda:

(furniture-recommender) (venv) Ys-Macbook-20:furniture-recommender-system yingyao$ conda install -c conda-forge lda
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - lda

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

Here's the error below via pip:

    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yingyao/miniforge3/envs/furniture-recommender/include -arch arm64 -I/Users/yingyao/miniforge3/envs/furniture-recommender/include -arch arm64 -I/Users/yingyao/Documents/GitHub/furniture-recommender-system/venv/include -I/Users/yingyao/miniforge3/envs/furniture-recommender/include/python3.8 -c lda/_lda.c -o build/temp.macosx-11.0-arm64-3.8/lda/_lda.o
    clang: error: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=11.0'
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/yingyao/Documents/GitHub/furniture-recommender-system/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7c/7t5wc26d3xsbyb2tcc_ygy9c0000gn/T/pip-install-tjqosq2i/lda_8d21923696e34aab9844ca682d37b5e7/setup.py'"'"'; __file__='"'"'/private/var/folders/7c/7t5wc26d3xsbyb2tcc_ygy9c0000gn/T/pip-install-tjqosq2i/lda_8d21923696e34aab9844ca682d37b5e7/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/7c/7t5wc26d3xsbyb2tcc_ygy9c0000gn/T/pip-record-fu9z688z/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yingyao/Documents/GitHub/furniture-recommender-system/venv/include/site/python3.8/lda Check the logs for full command output.

I preferred this package more than the one in skicit-learn so would like to continue using it. Does anyone know the solution by chance???

@shakewingo
Copy link
Author

Solved the issue by following setup:
apple/tensorflow_macos#153 and downgraded pillow to 8.2.0 via conda and h5py to 2.10.0 via pip.
Then pip install lda

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant