How to get the newest pytorch?

I uninstall pytorch from anaconda and tried to compile the source code from github because I want to use the latest part “nn.init”. But things go strange. My python part cannot find torch packages, which means, when we I try to type in

improt torch

Python 3.6.0 | Anaconda 4.3.0 can not find torch module.

I have no choice but to install it from Anaconda again and I still cannot use nn.init part.

What should I do?

p.s. Is there any else way to setup the weight initialization?

Thanks.

If you install from source using python setup.py build install, it should be installed for whatever Python instance would run if you type python at the same command line. If that’s not the same as your Anaconda install, make sure to call setup.py using the Anaconda instance of Python.

Thank you. :grinning:
I made two mistakes,

  1. I uninstalled pytorch on Anaconda before I recompiled the new one.
  2. I forgot to update my Anaconda.

Hope to be useful to others.