langflow-ai / langflow

⛓️ Langflow is a visual framework for building multi-agent and RAG applications. It's open-source, Python-powered, fully customizable, model and vector store agnostic.

Home Page:http://www.langflow.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation Issue in MacOS

judevjoseph opened this issue · comments

Tried both the stable and latest pre-release version. Stuck with below error

Starting Langflow v1.0.0a37...
objc[26936]: +[__NSPlaceholderSet initialize] may have been in progress in another thread when fork() was called.
objc[26936]: +[__NSPlaceholderSet initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
[05/25/24 09:38:34] ERROR 2024-05-25 09:38:34 - ERROR - glogging - Worker (pid:26936) was sent SIGABRT! glogging.py:272

System: Mac OS, Monterey
Python version : 3.10.11
PIP version : 24.0

Hey @judevjoseph! 👋 I'm here to help you with any issues you encounter while waiting for a human maintainer. Let's squash those bugs together!

The objc error during initialization might be related to the pywin32 dependency, which is specified with the marker sys_platform == 'win32'. This dependency is only relevant for Windows platforms and could potentially cause issues on non-Windows systems.

pywin32 = { version = "^306", markers = "sys_platform == 'win32'" }

If you are not on a Windows platform, this dependency should not be installed. However, if it is being installed incorrectly, it could lead to errors related to objc [1].

Additionally, there are several environment variables that need to be set for langflow to run correctly on MacOS. Here is a list of environment variables that langflow can use:

envVars:
  - key: LANGFLOW_CONFIG_DIR
    value: ~/.langflow
  - key: LANGFLOW_SAVE_DB_IN_CONFIG_DIR
    value: true
  - key: LANGFLOW_DATABASE_URL
    value: sqlite:///./langflow.db
  - key: LANGFLOW_LANGCHAIN_CACHE
    value: SQLiteCache
  - key: LANGFLOW_HOST
    value: 127.0.0.1
  - key: LANGFLOW_WORKERS
    value: 1
  - key: LANGFLOW_PORT
    value: 7860
  - key: LANGFLOW_LOG_LEVEL
    value: critical
  - key: LANGFLOW_LOG_FILE
    value: logs/langflow.log
  - key: LANGFLOW_FRONTEND_PATH
    value: /path/to/frontend/build/files
  - key: LANGFLOW_OPEN_BROWSER
    value: true
  - key: LANGFLOW_REMOVE_API_KEYS
    value: false
  - key: LANGFLOW_CACHE_TYPE
    value: memory
  - key: LANGFLOW_REDIS_HOST
    value: localhost
  - key: LANGFLOW_REDIS_PORT
    value: 6379
  - key: LANGFLOW_REDIS_DB
    value: 0
  - key: LANGFLOW_REDIS_CACHE_EXPIRE
    value: 3600
  - key: LANGFLOW_AUTO_LOGIN
    value: true
  - key: LANGFLOW_SUPERUSER
    value: admin
  - key: LANGFLOW_SUPERUSER_PASSWORD
    value: 123456
  - key: LANGFLOW_STORE_ENVIRONMENT_VARIABLES
    value: true
  - key: LANGFLOW_STORE_URL
    value: https://api.langflow.store
  - key: LANGFLOW_DOWNLOAD_WEBHOOK_URL
    value: 
  - key: LANGFLOW_LIKE_WEBHOOK_URL
    value: 

This configuration ensures that langflow can locate and use the necessary services and databases at the specified paths and with the provided API keys [2][3][4][5][6].

For further troubleshooting, you can refer to the Common Installation Issues section in the documentation.

Details

About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

Hey @judevjoseph

How are you?

This is related to the variable OBJC_DISABLE_INITIALIZE_FORK_SAFETY.

You should set this in your rc file (e.g ~/.zshrc) to make this error go away:
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES

Thanks @ogabrielluiz .

Setting this value worked. In my case, it was with ".zprofile". Thanks for the support.