13
votes

I'm trying to install Jupyter on Python 3.7 and seem to be stumbling over this error again and again;

winpty/cywinpty.c(598): fatal error C1083: Cannot open include file: 'winpty.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x86\\cl.exe' failed with exit status 2

I get the same error when attempting to install pywinpty via pip.

I have installed & reinstalled the build tools to no avail and the command window is elevated - any ideas?

UPDATE: Not quite resolved in 3.7 - but it worked fine in 3.6, I've rolled back.

4
Same for me issues on 3.8 rolled back to 3.6 for fix - Nitro

4 Answers

32
votes

Temporarily, until standard way does not work for Python 3.7, you can install pywinpty manually by using the prebuilt wheel from Gohlke's collection and then install jupyter with pip.

To install manually (from cmd or Powershell) use: pip install drive:\path\to\the\wheel\pywinpty-0.5.4-cp37-cp37m-win_amd64.whl

1
votes

There's an easier way to install from Gohlke's collection, which is to use pipwin. Install pipwin using pip install pipwin and then use it in place of pip whenever something doesn't work.

1
votes

I've a concrete solution for you guys... I'm also facing the same issue like you guys as it arises with python3.7 or later versions... But don't worry

I currently have Python 3.9.2

ERROR : image

Follow these Steps:-

--> Write these Commands in the cmd

  1. Just install pywinpty by using Gholke s Collection
  2. Now, just download it Pywinpty link
  3. Now, copy the path of the file, from where you have downloaded it... In my case it is file address
  4. After successfully installed Pywinpty... now "pip install jupyter"
  5. Then it's DONE... Now launch the notebook using "jupyter notebook"

In case its not been done... Make a comment below...

0
votes

I will leave this option here too. You can install the pywinpty 0.5.7 induvidually and then the rest of the installation can continue.

python -m pip install pywinpty==0.5.7

It worked for me.