Closed Knight7561 closed 2 months ago
To address the issue with installing chroma-hnswlib
on macOS, you can try setting the environment variable OBJC_DISABLE_INITIALIZE_FORK_SAFETY
to YES
. This can help avoid errors during the build process. Here is how you can do it:
Before running the installation command, set the environment variable:
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
Then, proceed with the installation:
python3 -m pip install langflow
Additionally, you can use Docker as an alternative installation method. Here are the steps:
Clone the LangFlow repository:
git clone https://github.com/langflow-ai/langflow.git
Navigate to the docker_example
directory:
cd langflow/docker_example
Run the Docker Compose file:
docker compose up
LangFlow will then be accessible at http://localhost:7860/.
These steps should help you successfully install LangFlow on macOS [1][2].
To continue talking to Dosu, mention @dosu.
But the install steps are working in Google colab.
i use mac and installed with conda and works werll , os sonoma 14.3
@Knight7561
Just to make sure, are you trying to install it using PIP?
Steps to Install Langflow:
python3 -m venv installation-test
source installation-test/bin/activate
python3 -m pip install langflow
langflow run
I didn't try conda, but I did using pip and the above error is via pip
@Knight7561 which Macbook do you have? I suspect you have a Macbook with a M1,M2 or M3 chip if this is case your hitting an known issue with chroma I suspect ref: https://medium.com/@pxlnkrbbt/in-case-someone-has-a-problem-when-installing-chromadb-ac2b6b536bfc ref2: https://github.com/chroma-core/chroma/issues/221
Can you try setting this in your terminal before running pip
export HNSWLIB_NO_NATIVE=1
I am using an Intel based Mac. Is that a compatibility issue ?
Trying out export HNSWLIB_NO_NATIVE=1
and then doing pip install langflow
works, with some mismatching dependencies. But, yes does the Job.
Thank you @NadirJ @carlosrcoelho for helping out.
Bug Description
Bug Description
Unable to complete pip install langflow due to incomplete installation of chroma-hnswlib. Also, I tried to install chroma-hnswlib using pip successfully.nevertheless, langflow install fails
Error: Downloading outcome-1.3.0.post0-py2.py3-none-any.whl (10 kB) Downloading sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB) Building wheels for collected packages: chroma-hnswlib, pysher, spider-client Building wheel for chroma-hnswlib (pyproject.toml) ... error error: subprocess-exited-with-error
× Building wheel for chroma-hnswlib (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [17 lines of output] running bdist_wheel running build running build_ext creating var creating var/folders creating var/folders/pb creating var/folders/pb/mpbt28916txgg2qpg8w58lgc0000gn creating var/folders/pb/mpbt28916txgg2qpg8w58lgc0000gn/T clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -I/Users/rohithvr/Downloads/install-test/installation-test/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c /var/folders/pb/mpbt28916txgg2qpg8w58lgc0000gn/T/tmp8ow5tk_w.cpp -o var/folders/pb/mpbt28916txgg2qpg8w58lgc0000gn/T/tmp8ow5tk_w.o -std=c++14 clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -I/Users/rohithvr/Downloads/install-test/installation-test/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c /var/folders/pb/mpbt28916txgg2qpg8w58lgc0000gn/T/tmpb2aajtca.cpp -o var/folders/pb/mpbt28916txgg2qpg8w58lgc0000gn/T/tmpb2aajtca.o -fvisibility=hidden building 'hnswlib' extension creating build creating build/temp.macosx-10.9-universal2-cpython-312 creating build/temp.macosx-10.9-universal2-cpython-312/python_bindings clang++ -fno-strict-overflow -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -O3 -Wall -arch arm64 -arch x86_64 -g -I/private/var/folders/pb/mpbt28916txgg2qpg8w58lgc0000gn/T/pip-build-env-iptyu1bb/overlay/lib/python3.12/site-packages/pybind11/include -I/private/var/folders/pb/mpbt28916txgg2qpg8w58lgc0000gn/T/pip-build-env-iptyu1bb/overlay/lib/python3.12/site-packages/numpy/_core/include -I./hnswlib/ -I/Users/rohithvr/Downloads/install-test/installation-test/include -I/Library/Frameworks/Python.framework/Versions/3.12/include/python3.12 -c ./python_bindings/bindings.cpp -o build/temp.macosx-10.9-universal2-cpython-312/./python_bindings/bindings.o -O3 -march=native -stdlib=libc++ -mmacosx-version-min=10.7 -DVERSION_INFO=\"0.7.3\" -std=c++14 -fvisibility=hidden clang: error: unsupported argument 'native' to option '-march=' 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: Failed building wheel for chroma-hnswlib Building wheel for pysher (pyproject.toml) ... done Created wheel for pysher: filename=Pysher-1.0.8-py3-none-any.whl size=9889 sha256=32e7130edc0499fd3df822431ac7be8177e5c03fff9fc7b91b903934a9b1b6fc Stored in directory: /Users/rohithvr/Library/Caches/pip/wheels/50/f5/b7/7d1662a18f42dddaf2fc5ad7f8611ef264cf0f634f376c3e6c Building wheel for spider-client (pyproject.toml) ... done Created wheel for spider-client: filename=spider_client-0.0.27-py3-none-any.whl size=5977 sha256=fceabe63b55d7270833fa43c2709ec7e0e0ef950ac58ec8d8a019273715ac13e Stored in directory: /Users/rohithvr/Library/Caches/pip/wheels/6c/41/42/4155300999390be7e455a6b05c602849f5810bf9383c43adb2 Successfully built pysher spider-client Failed to build chroma-hnswlib ERROR: Could not build wheels for chroma-hnswlib, which is required to install pyproject.toml-based projects
Reproduction
Reproduction
Tried the debug steps in previous issues and previously raised #3214 , Currently using Python 3.12 Reproduction Steps:
Ensure you have Python 3.10 or higher Create a virtual environment: python3 -m venv installation-test Activate the virtual environment: source installation-test/bin/activate Run: python3 -m pip install langflow