C++ error when trying to install

error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: https://visualstudio.microsoft.com/downloads/

hi all - trying to install but get an error that I need C++ 14.0 on my machine - I follow the link and install C++ but I then try and reinstall and still get an error (I’m in an environment in the terminal in Pycharm if that could be causing the issue?)

Hi @billlovell,
can you spell your install flow here? I would like to know the steps you followed to get to this error. This link may be relevant to this: https://www.scivision.dev/python-windows-visual-c-14-required/

Also, is cl.exe available in your terminal?

We generally suggest this flow to run Streamlit in Windows that uses Anaconda Navigator. The reason we do so is to limit the amount of “external” dependencies that may be required on Windows.

Matteo

Hi @monchier , I met the error: Microsoft Visual C++ 14.0 is required firstly and followed the link you shared to install VC++ 14.0. After that, I met new error as below. Could you please advise if you still recommend Anaconda Navigator to install Streamlit? Thanks

ERROR: Command errored out with exit status 1:
 command: 'c:\users\hyuan11\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\hyuan11\\AppData\\Local\\Temp\\pip-install-a5zbu9iq\\pywinpty\\setup.py'"'"'; __file__='"'"'C:\\Users\\hyuan11\\AppData\\Local\\Temp\\pip-install-a5zbu9iq\\pywinpty\\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\hyuan11\AppData\Local\Temp\pip-record-gpa54j04\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\hyuan11\appdata\local\programs\python\python39\Include\pywinpty'
     cwd: C:\Users\hyuan11\AppData\Local\Temp\pip-install-a5zbu9iq\pywinpty\
Complete output (25 lines):
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\winpty
copying winpty\ptyprocess.py -> build\lib.win-amd64-3.9\winpty
copying winpty\winpty_wrapper.py -> build\lib.win-amd64-3.9\winpty
copying winpty\__init__.py -> build\lib.win-amd64-3.9\winpty
creating build\lib.win-amd64-3.9\winpty\tests
copying winpty\tests\test_cywinpty.py -> build\lib.win-amd64-3.9\winpty\tests
copying winpty\tests\test_ptyprocess.py -> build\lib.win-amd64-3.9\winpty\tests
copying winpty\tests\test_winpty_wrapper.py -> build\lib.win-amd64-3.9\winpty\tests
copying winpty\tests\__init__.py -> build\lib.win-amd64-3.9\winpty\tests
creating build\lib.win-amd64-3.9\winpty\_winpty
copying winpty\_winpty\__init__.py -> build\lib.win-amd64-3.9\winpty\_winpty
running build_ext
building 'winpty.cywinpty' extension
creating build\temp.win-amd64-3.9
creating build\temp.win-amd64-3.9\Release
creating build\temp.win-amd64-3.9\Release\winpty
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\hyuan11\appdata\local\programs\python\python39\include -Ic:\users\hyuan11\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29910\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcwinpty/cywinpty.c /Fobuild\temp.win-amd64-3.9\Release\winpty/cywinpty.obj
cywinpty.c
winpty/cywinpty.c(629): fatal error C1083: Cannot open include file: 'winpty.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
----------------------------------------

ERROR: Command errored out with exit status 1: ‘c:\users\hyuan11\appdata\local\programs\python\python39\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\hyuan11\AppData\Local\Temp\pip-install-a5zbu9iq\pywinpty\setup.py’"’"’; file=’"’"‘C:\Users\hyuan11\AppData\Local\Temp\pip-install-a5zbu9iq\pywinpty\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\hyuan11\AppData\Local\Temp\pip-record-gpa54j04\install-record.txt’ --single-version-externally-managed --compile --install-headers ‘c:\users\hyuan11\appdata\local\programs\python\python39\Include\pywinpty’ Check the logs for full command output.