-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip install flash-attn always happens ModuleNotFoundError: No module named 'packaging',but actually i have pip install packaging #453
Comments
Try this:
|
someone reported this worked in their environment. but when we tried in a fresh docker/conda env, its not working. nor is installing packaging. see https://github.com/OpenAccess-AI-Collective/axolotl/pull/426/files for the dockerfile |
Same question here. And it is not working: × Getting requirements to build wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. × Getting requirements to build wheel did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. |
have you sovled it ? |
Use:
|
I experienced the same issue and it seems to be the issue with the order of installation. In my case, I removed |
The issue here is that once you add a pyproject.toml, pip will use that and use build isolation. To make isolation work, we would need to add to the toml:
However that can be annoying too since it will take longer to install torch in an isolated environment, esp when it's just downloading the binary wheels anyway.. I wonder if there's a way to ignore the pyproject.toml's presence when generating the packages, so they don't try to use build isolation. |
fixed by 73bd3f3 |
Hey @tmm1, sorry to bother Still facing the same issue:
|
The fix is out. Try:
|
@tmm1 thanks, it works =) |
@tridao this issue can be closed. If you want to give me issue maint privileges, I can help out keeping things tidy. |
Same issue for me in |
|
I'm trying
|
Did you try |
Not working either |
hi,is there a solution now? |
|
No joy on this. it was missing wheel. Installing wheel package then just errored. |
This still seems to be an ongoing issue when adding to poetry.lock.
Pip installing doesn't include freezing the dependencies. There's no guarantee of matching dependencies in a production environment with the current solution (that provided by @tridao - [thank you for sharing your solution]). |
Yeah I don't have much bandwidth to spend on packaging, python packaging is kind of a mess once you involve CUDA and torch. |
The issue is still relevant when you want to use a |
Indeed, |
e.g. In my requirement.txt: Despite being manual, this is more flexible since setup.py picks the wheel based on CUDA, torch version of the machine where the build happens. IRL, you might build and packaged in build farm machines that doesn't have the same CUDA version as your worker machines. |
I'm definitely not an expert on this topic. But couldn't this problem be solved by publishing the .whl files to pypi.org? |
PyPI has a file size limit of 60MB. |
Has the error with poetry.lock been fixed? I am still facing issues when trying to install
|
The solution (required for older A quick and dirty workaround allowing us to install
More info (from build logs):
|
above commands work to me |
Collecting flash-attn
Using cached flash_attn-2.0.7.tar.gz (2.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "C:\Users\24259\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\24259\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\24259\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\24259\AppData\Local\Temp\pip-build-env-t80nwpmz\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\24259\AppData\Local\Temp\pip-build-env-t80nwpmz\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "C:\Users\24259\AppData\Local\Temp\pip-build-env-t80nwpmz\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\24259\AppData\Local\Temp\pip-build-env-t80nwpmz\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 8, in
ModuleNotFoundError: No module named 'packaging'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
PS C:\d\code_program\python\ai> pip install flash-attn
Collecting flash-attn
Using cached flash_attn-2.0.7.tar.gz (2.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "C:\Users\24259\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\24259\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\24259\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\24259\AppData\Local\Temp\pip-build-env-wdj0xi3r\overlay\Lib\site-packages\setuptools\build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\24259\AppData\Local\Temp\pip-build-env-wdj0xi3r\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "C:\Users\24259\AppData\Local\Temp\pip-build-env-wdj0xi3r\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\24259\AppData\Local\Temp\pip-build-env-wdj0xi3r\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 8, in
ModuleNotFoundError: No module named 'packaging'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
The text was updated successfully, but these errors were encountered: