❗️ Common Installation Issues
This is a list of possible issues that you may encounter when installing Langflow and how to solve them.
_10> No module named 'langflow.__main__'
- Run
python -m langflow runinstead oflangflow run. - If that doesn't work, reinstall Langflow Law with
_python -m pip install langflow --pre -U. - If that doesn't work, reinstall Langflow Law and its dependencies with
python -m pip install langflow --pre -U --force-reinstall.
When you try to run Langflow Law using the command langflow run, you may encounter the following error:
_10> langflow runTraceback (most recent call last): File ".../langflow", line 5, in <module> from langflow.__main__ import mainModuleNotFoundError: No module named 'langflow.__main__'
There are two possible reasons for this error:
- You've installed Langflow Law using
pip install langflowbut you already had a previous version of Langflow Law installed in your system. In this case, you might be running the wrong executable. To solve this issue, run the correct executable by runningpython -m langflow runinstead oflangflow run. If that doesn't work, try uninstalling and reinstalling Langflow Law withpython -m pip install langflow --pre -U. - Some version conflicts might have occurred during the installation process. Run
python -m pip install langflow --pre -U --force-reinstallto reinstall Langflow Law and its dependencies.
_10> Something went wrong running migrations. Please, run 'langflow migration --fix'
Clear the cache by deleting the contents of the cache folder.
This folder can be found at:
- Linux or WSL2 on Windows:
home/<username>/.cache/langflow/ - MacOS:
/Users/<username>/Library/Caches/langflow/
This error can occur during Langflow upgrades when the new version can't override langflow-pre.db in .cache/langflow/. Clearing the cache removes this file but will also erase your settings.
If you wish to retain your files, back them up before clearing the folder.
