Skip to content
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

ImportError: cannot import name 'amp' from 'apex' #154

Open
amrzv opened this issue Aug 22, 2023 · 1 comment
Open

ImportError: cannot import name 'amp' from 'apex' #154

amrzv opened this issue Aug 22, 2023 · 1 comment

Comments

@amrzv
Copy link

amrzv commented Aug 22, 2023

Hello.
setup.sh fails with the following traceback

Traceback (most recent call last):
    File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/local/lib/python3.10/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-jwgwyq2j/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-jwgwyq2j/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 325, in _get_build_requires
      self.run_setup()
    File "/tmp/pip-build-env-jwgwyq2j/overlay/local/lib/python3.10/dist-packages/setuptools/build_meta.py", line 341, in run_setup
      exec(code, locals())
    File "<string>", line 5, in <module>
  ModuleNotFoundError: No module named 'packaging'

image

And as a result from apex import amp fails:
ImportError: cannot import name 'amp' from 'apex' (unknown location)

Tested in colab env.

  • Stackoverflow
    • packaging module is already installed so pip install packaging doesn't help
  • issue
@pranalidhane
Copy link

Did you solve this? I am facing same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants