question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hello I’m having problems to import apex to my python project. I have installed the module following the instructions.

$ pip3 install -v --no-cache-dir ./ --user

Then when I try to import amp from apex module it raises the next error:

Traceback (most recent call last): File "train.py", line 18, in <module> from apex import amp File "/home/pharaun/.local/lib/python3.6/site-packages/apex/__init__.py", line 6, in <module> from . import amp File "/home/pharaun/.local/lib/python3.6/site-packages/apex/amp/__init__.py", line 1, in <module> from .amp import init, half_function, float_function, promote_function,\ File "/home/pharaun/.local/lib/python3.6/site-packages/apex/amp/amp.py", line 5, in <module> from .frontend import * File "/home/pharaun/.local/lib/python3.6/site-packages/apex/amp/frontend.py", line 2, in <module> from ._initialize import _initialize File "/home/pharaun/.local/lib/python3.6/site-packages/apex/amp/_initialize.py", line 9, in <module> from ._process_optimizer import _process_optimizer File "/home/pharaun/.local/lib/python3.6/site-packages/apex/amp/_process_optimizer.py", line 6, in <module> from ..optimizers import FusedSGD File "/home/pharaun/.local/lib/python3.6/site-packages/apex/optimizers/__init__.py", line 2, in <module> from .fused_adam import FusedAdam File "/home/pharaun/.local/lib/python3.6/site-packages/apex/optimizers/fused_adam.py", line 3, in <module> from amp_C import multi_tensor_adam ModuleNotFoundError: No module named 'amp_C' Did some one have the same issue? I tried to search it but I didn’t find anything.

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
FDecaYedcommented, Sep 3, 2019

@ptrblck @mcarilli my bad. I cleaned up fused novograd/lamb before final push but forgot to do the same for adam. I’ll push another change to fix

  • import error when not building with extensions
  • making separate list for fp16/32
0reactions
FDecaYedcommented, Sep 3, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix ImportError: Cannot Import Name in Python - Rollbar
The Python ImportError: cannot import name error occurs when an imported class is not accessible or is in a circular dependency.
Read more >
Python Import Error (ModuleNotFoundError) - Finxter
Python's ImportError ( ModuleNotFoundError ) indicates that you tried to import a module that Python doesn't find. It can usually be eliminated by...
Read more >
Python Exception Handling: ImportError and ... - Airbrake Blog
The ImportError is raised when an import statement has trouble successfully importing the specified module. Typically, such a problem is due to ...
Read more >
import error: 'No module named' *does* exist - python
I set the PYTHONPATH to '.' and that solved it for me. export PYTHONPATH='.' For a one-liner you could as easily do: PYTHONPATH='....
Read more >
Easiest way to Fix importerror in python ( All in One )
There are two root causes for importerror in python. The First is absence of respective python module and second is incorrect path configuration....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found