I’ve been trying to fine-tune LLaMA 3.2 with Unsloth, and I hit an error right from the first step. Specifically, while running pip install unsloth, I encountered the below error message. Just thought I’d document it here in case it’s helpful to others.
This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths
Let’s walk through how to fix this issue and get your pip installations working smoothly.
Understanding the Problem
Windows has a default limit on file path lengths, which can cause issues when installing certain packages, especially those with deeply nested directories. The unsloth package seems to be one that’s affected by this limitation.
The Solution: Enabling Long Path Support
To resolve this, we need to modify a Windows registry setting. Here’s how:
- Open PowerShell as Administrator
- Run the Following Command
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
This command creates a new registry entry that enables support for long file paths.
Conclusion
Enabling long path support in Windows can solve many installation issues, not just for pip but for other development tools as well. If you’re a developer working on Windows, this is a helpful setting to enable to avoid path-related headaches in the future.
Remember, always be cautious when modifying system settings, and ensure you understand the implications of the changes you’re making.
I’ll be sharing more LLM-related challenges and fine-tuning issues as I encounter them. Follow me for updates and tips!
