not able to install easyocr (pytorch error)
I am trying to install easyocr for python using pip
pip install easyocr

but it's not installing
its givig me this in the terminal
ERROR: torchvision 0.5.0 has requirement torch==1.4.0, but you'll have torch 0.1.2.post2 which is incompatible.
Installing collected packages: torch, torchvision, python-bidi, scipy, cycler, kiwisolver, python-dateutil, certifi, pyparsing, matplotlib, PyWavelets, imageio, decorator, networkx, tifffile, scikit-image, easyocr
  Running setup.py install for torch ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\murari\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\Murari\\AppData\\Local\\Temp\\pip-install-jl3470hv\\torch\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\Murari\\AppData\\Local\\Temp\\pip-install-jl3470hv\\torch\\setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record 'C:\Users\Murari\AppData\Local\Temp\pip-record-8j183bzh\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\Murari\AppData\Local\Temp\pip-install-jl3470hv\torch\
    Complete output (23 lines):
    running install
    running build_deps
    Traceback (most recent call last):
      File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;
      File &quot;C:\Users\Murari\AppData\Local\Temp\pip-install-jl3470hv\torch\setup.py&quot;, line 265, in &lt;module&gt;
        description=&quot;Tensors and Dynamic neural networks in Python with strong GPU acceleration&quot;,
      File &quot;c:\users\murari\appdata\local\programs\python\python37\lib\site-packages\setuptools\__init__.py&quot;, line 145, in setup
        return distutils.core.setup(**attrs)
      File &quot;c:\users\murari\appdata\local\programs\python\python37\lib\distutils\core.py&quot;, line 148, in setup
        dist.run_commands()
      File &quot;c:\users\murari\appdata\local\programs\python\python37\lib\distutils\dist.py&quot;, line 966, in run_commands
        self.run_command(cmd)
      File &quot;c:\users\murari\appdata\local\programs\python\python37\lib\distutils\dist.py&quot;, line 985, in run_command
        cmd_obj.run()
      File &quot;C:\Users\Murari\AppData\Local\Temp\pip-install-jl3470hv\torch\setup.py&quot;, line 99, in run
        self.run_command('build_deps')
      File &quot;c:\users\murari\appdata\local\programs\python\python37\lib\distutils\cmd.py&quot;, line 313, in run_command
        self.distribution.run_command(command)
      File &quot;c:\users\murari\appdata\local\programs\python\python37\lib\distutils\dist.py&quot;, line 985, in run_command
        cmd_obj.run()
      File &quot;C:\Users\Murari\AppData\Local\Temp\pip-install-jl3470hv\torch\setup.py&quot;, 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\murari\appdata\local\programs\python\python37\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\Murari\\AppData\\Local\\Temp\\pip-install-jl3470hv\\torch\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\Murari\\AppData\\Local\\Temp\\pip-install-jl3470hv\\torch\\setup.py'&quot;'&quot;';f=getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__);code=f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record 'C:\Users\Murari\AppData\Local\Temp\pip-record-8j183bzh\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.
WARNING: You are using pip version 19.2.3, however version 20.2.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.


I had the same issue and finally fixed it by creating the environment.
Here is the code.
!conda create -n easyocr python=3.8

!conda activate easyocr

pip install easyocr


If the issue got resolved, please vote for the answer.
