axolotl
axolotl copied to clipboard
pip install (as per docs) fails with ModuleNotFoundError: No module named 'axolotl'
Please check that this issue hasn't been reported before.
- [X] I searched previous Bug Reports didn't find any similar reports.
Expected Behavior
When installing just using pip via the command in the docs:
pip3 install "axolotl[flash-attn,deepspeed] @ git+https://github.com/OpenAccess-AI-Collective/axolotl"
Current behaviour
/home/nlothian/axolotl/venv/bin/python3: Error while finding module specification for 'axolotl.cli.train' (ModuleNotFoundError: No module named 'axolotl')
Traceback (most recent call last):
File "/home/nlothian/axolotl/venv/bin/accelerate", line 8, in <module>
sys.exit(main())
File "/home/nlothian/axolotl/venv/lib/python3.9/site-packages/accelerate/commands/accelerate_cli.py", line 47, in main
args.func(args)
File "/home/nlothian/axolotl/venv/lib/python3.9/site-packages/accelerate/commands/launch.py", line 994, in launch_command
simple_launcher(args)
File "/home/nlothian/axolotl/venv/lib/python3.9/site-packages/accelerate/commands/launch.py", line 636, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/home/nlothian/axolotl/venv/bin/python3', '-m', 'axolotl.cli.train', 'examples/openllama-3b/lora.yml']' returned non-zero exit status 1.
Others are seeing the same behavior: https://discord.com/channels/1104757954588196865/1111279858136383509/1164806862508666900
Steps to reproduce
Install via pip:
pip3 install "axolotl[flash-attn,deepspeed] @ git+https://github.com/OpenAccess-AI-Collective/axolotl"
However cloning the repo and installing that seems to get further:
git clone https://github.com/OpenAccess-AI-Collective/axolotl
cd axolotl
pip3 install packaging
pip3 install -e '.[flash-attn,deepspeed]'
Config yaml
No response
Possible solution
No response
Which Operating Systems are you using?
- [X] Linux
- [ ] macOS
- [ ] Windows
Python Version
3.10
axolotl branch-commit
main/7fabc4d
Acknowledgements
- [X] My issue title is concise, descriptive, and in title casing.
- [X] I have searched the existing issues to make sure this bug has not been reported yet.
- [X] I am using the latest version of axolotl.
- [X] I have provided enough information for the maintainers to reproduce and diagnose the issue.
Duplicate of #910 ?
Duplicate of #910 ?
Probably the same underlying issue but the error message is subtly different:
(ModuleNotFoundError: No module named 'axolotl')
vs (ModuleNotFoundError: No module named 'axolotl.cli')
Unclear why this is the case.
May I ask if docker works? Alternatively, could you try create a new conda/pip venv again?
Just running pip3 install -e '.[flash-attn,deepspeed]' once again in my venv solved the issue.
Actually the docs are wrong. You need to git clone the repo, then cd into the repo. Then do pip install -e '.[flash-attn,deepspeed]'
and you will almost certainly need: pip install --upgrade flash_attn
I am having this same issue. I looked at other issue reports and haven't found a solution yet
Axolotl needs to be installed from source by GitHub cloning the repository currently. We have dependencies that aren't packages currently so we can't push axolotl as a pypi package currently
Is there any plan to support installing Axolotl without cloning the repository or is that a fundamental limitation?
Edit: This is incorrect. See comment below: https://github.com/OpenAccess-AI-Collective/axolotl/issues/945#issuecomment-1994156576
@fozziethebeat , you can run it like this.
pip3 install "axolotl[flash-attn,deepspeed] @ git+https://github.com/OpenAccess-AI-Collective/axolotl"
@NanoCode012 Interesting, that's what I'm doing (in a conda environment) but Axolotl isn't being found. When I check the environments site-packages I just see the axolotl-0.4.0.dist-info
directory but not the actual package.
Running python -m axolotl.cli.preprocess
gives me the disappointing
/home/fozziethebeat/anaconda3/envs/planar-ax/bin/python: Error while finding module specification for 'axolotl.cli.preprocess' (ModuleNotFoundError: No module named 'axolotl')
Oh sorry, I did not read the earlier context. Hmm, it would seem that it's necessary to clone as per above discussion.