AWS Torch Import Error on Jupyter

About the numpy issue, check what pip --version says. It has to match to the root of where your which python or python --version is pointing. On some machines pip3 will correspond to the python you are using, rather than pip.

About the 2nd issue, i.e. AttributeError: ‘FloatTensor’ object has no attribute ‘requires_grad’, I think you are on PyTorch v0.3.1 or something old. Can you print out print(torch.__version__) and make sure you are on 1.0.0?

1 Like