# ModuleNotFoundError: No module named 'tools.nnwrap'

**URL:** <https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621>\
**Category:** Uncategorized\
**Created:** [November 20, 2019, 2:29pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621 "2019-11-20T14:29:22Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![shyamal](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@shyamal](https://discuss.pytorch.org/u/shyamal)\
**Post date:** [November 20, 2019, 2:29pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/1 "2019-11-20T14:29:22Z")

</div>

I am trying to install PyTorch but every time it throws the same error ( ModuleNotFoundError: No module named ‘tools.nnwrap’).  
This is what is typed: pip install torch

This is what I get every time:  
Collecting torch  
Using cached [https://files.pythonhosted.org/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz](https://files.pythonhosted.org/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz)  
Requirement already satisfied: pyyaml in c:\users\user\appdata\local\programs\python\python37-32\lib\site-packages (from torch) (5.1.2)  
Installing collected packages: torch  
Running setup.py install for torch … error  
ERROR: Command errored out with exit status 1:  
command: ‘c:\users\user\appdata\local\programs\python\python37-32\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\User\AppData\Local\Temp\pip-install-oegjniuy\torch\setup.py’"’"’; **file** =’"’"‘C:\Users\User\AppData\Local\Temp\pip-install-oegjniuy\torch\setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)( **file** );code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, **file** , ‘"’"‘exec’"’"’))’ install --record ‘C:\Users\User\AppData\Local\Temp\pip-record-_b\_c49sh\install-record.txt’ --single-version-externally-managed --compile  
cwd: C:\Users\User\AppData\Local\Temp\pip-install-oegjniuy\torch  
Complete output (23 lines):  
running install  
running build\_deps  
Traceback (most recent call last):  
File “”, line 1, in   
File “C:\Users\User\AppData\Local\Temp\pip-install-oegjniuy\torch\setup.py”, line 265, in   
description=“Tensors and Dynamic neural networks in Python with strong GPU acceleration”,  
File "C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\setuptools\_init_.py", line 145, in setup  
return distutils.core.setup(\*\*attrs)  
File “C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\distutils\core.py”, line 148, in setup  
dist.run\_commands()  
File “C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\distutils\dist.py”, line 966, in run\_commands  
self.run\_command(cmd)  
File “C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\distutils\dist.py”, line 985, in run\_command  
cmd\_obj.run()  
File “C:\Users\User\AppData\Local\Temp\pip-install-oegjniuy\torch\setup.py”, line 99, in run  
self.run\_command(‘build\_deps’)  
File “C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\distutils\cmd.py”, line 313, in run\_command  
self.distribution.run\_command(command)  
File “C:\Users\User\AppData\Local\Programs\Python\Python37-32\Lib\distutils\dist.py”, line 985, in run\_command  
cmd\_obj.run()  
File “C:\Users\User\AppData\Local\Temp\pip-install-oegjniuy\torch\setup.py”, line 51, in run  
from tools.nnwrap import generate\_wrappers as generate\_nn\_wrappers  
ModuleNotFoundError: No module named ‘tools.nnwrap’  
----------------------------------------  
ERROR: Command errored out with exit status 1: ‘c:\users\user\appdata\local\programs\python\python37-32\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\User\AppData\Local\Temp\pip-install-oegjniuy\torch\setup.py’"’"’; **file** =’"’"‘C:\Users\User\AppData\Local\Temp\pip-install-oegjniuy\torch\setup.py’"’"’;f=getattr(tokenize, ‘"’"‘open’"’"’, open)( **file** );code=f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, **file** , ‘"’"‘exec’"’"’))’ install --record ‘C:\Users\User\AppData\Local\Temp\pip-record-\_b\_c49sh\install-record.txt’ --single-version-externally-managed --compile Check the logs for full command output.

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [November 20, 2019, 2:32pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/2 "2019-11-20T14:32:02Z")

</div>

Hi,

please follow the instructions in the get started page: [https://pytorch.org/get-started/locally/](https://pytorch.org/get-started/locally/)  
From the binary you downloaded, you are trying to install the version 0.1.2 which is the first ever release of pytorch.

---

<div class="post-metadata">

**Author:** ![shyamal](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@shyamal](https://discuss.pytorch.org/u/shyamal)\
**Post date:** [November 21, 2019, 2:03am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/3 "2019-11-21T02:03:57Z")

</div>

It still didn’t work.  
I have followed the instructions given but still getting some errors.  
I ran the command :  
pip3 install torch==1.3.1+cu92 torchvision==0.4.2+cu92 -f [https://download.pytorch.org/whl/torch\_stable.html](https://download.pytorch.org/whl/torch_stable.html)

Error i got:  
Looking in links: [https://download.pytorch.org/whl/torch\_stable.html](https://download.pytorch.org/whl/torch_stable.html)  
ERROR: Could not find a version that satisfies the requirement torch==1.3.1+cu92 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)  
ERROR: No matching distribution found for torch==1.3.1+cu92

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [November 21, 2019, 2:45pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/4 "2019-11-21T14:45:27Z")

</div>

If you open the link, you’ll see that these versions are here.  
Could you give more context on which machine do you install this? How did you get python?

---

<div class="post-metadata">

**Author:** ![shyamal](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@shyamal](https://discuss.pytorch.org/u/shyamal)\
**Post date:** [November 22, 2019, 3:34pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/5 "2019-11-22T15:34:41Z")

</div>

It is Windows 64 bit  
python 3.7.5 32 bit  
no Anaconda environment

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [November 22, 2019, 8:19pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/6 "2019-11-22T20:19:58Z")

</div>

Ho,  
I am not sure we actually build binaries for 32 bit python 😕  
cc @peterjc123

---

<div class="post-metadata">

**Author:** ![peterjc123](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/peterjc123/32/2790_2.png) [@peterjc123](https://discuss.pytorch.org/u/peterjc123)\
**Post date:** [November 23, 2019, 1:45am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/7 "2019-11-23T01:45:21Z")

</div>

No, we don’t provide binaries for 32-bit Python because:

1. On desktops and servers, the mainstream OS is 64-bit.
2. x86 binaries doesn’t support CUDA and there is no AVX2 support.

But it should be fairly easy to build it yourself if really need that. BTW, Is there a particular reason that you need to use 32-bit Python on a x64 host system? I think it would be easier if you use x64 Python.

---

<div class="post-metadata">

**Author:** ![shyamal](https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/s/dbc845/32.png) [@shyamal](https://discuss.pytorch.org/u/shyamal)\
**Post date:** [November 23, 2019, 10:37am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/8 "2019-11-23T10:37:11Z")

</div>

I install python 3.7 64 bit and now it works 😍 THANK YOU GUYS 👍

---

<div class="post-metadata">

**Author:** ![Aqsa\_Zahid](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/aqsa_zahid/32/11880_2.png) [@Aqsa\_Zahid](https://discuss.pytorch.org/u/Aqsa_Zahid)\
**Post date:** [January 13, 2020, 4:16pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/9 "2020-01-13T16:16:07Z")

</div>

Hi!  
I am facing same issue i have python 3.6.8 64 no anaconda environment i am using Bash app. I have checked above link and run command but again i got errors

---

<div class="post-metadata">

**Author:** ![Hiva\_Man](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/hiva_man/32/17481_2.png) [@Hiva\_Man](https://discuss.pytorch.org/u/Hiva_Man)\
**Post date:** [January 23, 2020, 5:29am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/10 "2020-01-23T05:29:06Z")

</div>

@peterjc123 hi all and Peter…

my PC is quite old, from 2010. I have:

- 32bit win7
- python3.6.5
- no conda

is there still chance to install torch? I m facing same

> tools.nnwrap

issue…

---

<div class="post-metadata">

**Author:** ![peterjc123](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/peterjc123/32/2790_2.png) [@peterjc123](https://discuss.pytorch.org/u/peterjc123)\
**Post date:** [January 23, 2020, 5:45am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/11 "2020-01-23T05:45:58Z")

</div>

There is no easy way to do this. You’ll have to build from source.

---

<div class="post-metadata">

**Author:** ![Satyam\_sharma](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/satyam_sharma/32/20898_2.png) [@Satyam\_sharma](https://discuss.pytorch.org/u/Satyam_sharma)\
**Post date:** [February 24, 2020, 12:20am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/12 "2020-02-24T00:20:07Z")

</div>

Hello shymal ,  
I m tired with this issue too.  
can you tell me which pip command you used after install python x64

---

<div class="post-metadata">

**Author:** ![harshrathod50](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/harshrathod50/32/29012_2.png) [@harshrathod50](https://discuss.pytorch.org/u/harshrathod50)\
**Post date:** [November 4, 2020, 11:21am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/13 "2020-11-04T11:21:00Z")

</div>

I am so getting the same error:

```auto
[root@ip-172-26-11-98 ~]# python3.9 -m pip install torch==1.7.0+cpu torchvision==0.8.1+cpu torchaudio==0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html
ERROR: Could not find a version that satisfies the requirement torch==1.7.0+cpu (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.7.0+cpu

```

I’m on CentOS 7.8. What should I do now? Is there any lower version which can support?

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [November 4, 2020, 2:21pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/14 "2020-11-04T14:21:03Z")

</div>

Hi,

What is your operating system/python version? Having only this very old version available usually means that you’re running a 32bit python on windows (which we do not support, you should get a 64bit python).

---

<div class="post-metadata">

**Author:** ![Tirth\_Anand](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/tirth_anand/32/30692_2.png) [@Tirth\_Anand](https://discuss.pytorch.org/u/Tirth_Anand)\
**Post date:** [November 6, 2020, 4:22am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/15 "2020-11-06T04:22:06Z")

</div>

Hi,  
I have a 32 bit python on a 64 bit windows too. I want to install pytorch so that i can work on idle, even though i have it in anaconda. If I uninstall my 32 bit python and install a 64 bit python, will the libraries that i had individually installed using pip get uninstalled too?

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [November 6, 2020, 2:50pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/16 "2020-11-06T14:50:59Z")

</div>

Hi,

Yes you will need to re-install all libraries I’m afraid.  
You can use `pip freeze` to get the list of all installed libraries to be able to easily re-install them.

---

<div class="post-metadata">

**Author:** ![Tirth\_Anand](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/tirth_anand/32/30692_2.png) [@Tirth\_Anand](https://discuss.pytorch.org/u/Tirth_Anand)\
**Post date:** [November 6, 2020, 4:31pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/17 "2020-11-06T16:31:46Z")

</div>

I have installed a 64 bit python now, but its still showing the same error

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [November 6, 2020, 4:57pm UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/18 "2020-11-06T16:57:29Z")

</div>

You need to make sure that the python and pip you’re using properly point to the 64bit version.

---

<div class="post-metadata">

**Author:** ![Tirth\_Anand](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/tirth_anand/32/30692_2.png) [@Tirth\_Anand](https://discuss.pytorch.org/u/Tirth_Anand)\
**Post date:** [November 7, 2020, 5:08am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/19 "2020-11-07T05:08:04Z")

</div>

How do I do that? I am sorry that I dont know this stuff…

---

<div class="post-metadata">

**Author:** ![Tirth\_Anand](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/tirth_anand/32/30692_2.png) [@Tirth\_Anand](https://discuss.pytorch.org/u/Tirth_Anand)\
**Post date:** [November 8, 2020, 4:51am UTC](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621/20 "2020-11-08T04:51:38Z")

</div>

After I installed the 64 bit python, I installed some other libraries such as numpy, pandas etc. and now I am able to use them on python. So that must mean my pip is pointing to the 64 bit python…shouldnt it?

[Next page](https://discuss.pytorch.org/t/modulenotfounderror-no-module-named-tools-nnwrap/61621.md?page=2)
