Closed jaanli closed 1 year ago
OK I tried checking the box for the different version of MSVC 14.0 and am getting a different error.
❯ pip install yappi --no-cache-dir
Collecting yappi
Downloading yappi-1.3.2.tar.gz (58 kB)
|████████████████████████████████| 58 kB 4.1 MB/s
Building wheels for collected packages: yappi
Building wheel for yappi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\tools\miniconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Use
rs\\jaan\\AppData\\Local\\Temp\\pip-install-77mnume1\\yappi_92d17e433bed4143a4cbaeeb5756b745\\setup.py'"'"'; __file__='"
'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-77mnume1\\yappi_92d17e433bed4143a4cbaeeb5756b745\\setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools im
port setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '
"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\jaan\AppData\Local\Temp\pip-wheel-iu_bw5bg'
cwd: C:\Users\jaan\AppData\Local\Temp\pip-install-77mnume1\yappi_92d17e433bed4143a4cbaeeb5756b745\ Complete output (15 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.8
copying yappi\yappi.py -> build\lib.win32-3.8
running build_ext
building '_yappi' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\yappi
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\tools\minic
onda3\include -Ic:\tools\miniconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Pro
gram Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.
10240.0\ucrt" /Tcyappi/_yappi.c /Fobuild\temp.win32-3.8\Release\yappi/_yappi.obj
_yappi.c
c:\tools\miniconda3\include\pyconfig.h(206): fatal error C1083: Cannot open include file: 'basetsd.h':
No such file or
directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Failed building wheel for yappi
Running setup.py clean for yappi
Failed to build yappi
Installing collected packages: yappi
Running setup.py install for yappi ... error
ERROR: Command errored out with exit status 1:
command: 'c:\tools\miniconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\U
sers\\jaan\\AppData\\Local\\Temp\\pip-install-77mnume1\\yappi_92d17e433bed4143a4cbaeeb5756b745\\setup.py'"'"'; __file__=
'"'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-77mnume1\\yappi_92d17e433bed4143a4cbaeeb5756b745\\setup.py'"'"';
f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools
import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__,
'"'"'exec'"'"'))' install --record 'C:\Users\jaan\AppData\Local\Temp\pip-record-j1qzfdgj\install-record.txt' --single-v
ersion-externally-managed --compile --install-headers 'c:\tools\miniconda3\Include\yappi'
cwd: C:\Users\jaan\AppData\Local\Temp\pip-install-77mnume1\yappi_92d17e433bed4143a4cbaeeb5756b745\
Complete output (15 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
copying yappi\yappi.py -> build\lib.win32-3.8
running build_ext
building '_yappi' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\yappi
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\tools\min
creating build
creating build\lib.win32-3.8
copying yappi\yappi.py -> build\lib.win32-3.8
running build_ext
building '_yappi' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\yappi
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\tools\miniconda3\include -Ic:\tools\miniconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /Tcyappi/_yappi.c /Fobuild\temp.win32-3.8\Release\yappi/_yappi.obj
_yappi.c
c:\tools\miniconda3\include\pyconfig.h(206): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\tools\miniconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-77mnume1\\yappi_92d17e433bed4143a4cbaeeb5756b745\\setup.py'"'"'; __file__='"'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-77mnume1\\yappi_92d17e433bed4143a4cbaeeb5756b745\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code =
f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\jaan\AppData\Local\Temp\pip-record-j1qzfdgj\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\tools\miniconda3\Include\yappi' Check the logs for full command output.
The last option did not work either:
❯ pip install yappi --no-cache-dir
Defaulting to user installation because normal site-packages is not writeable
Collecting yappi
Downloading yappi-1.3.2.tar.gz (58 kB)
|████████████████████████████████| 58 kB 1.9 MB/s
Building wheels for collected packages: yappi
Building wheel for yappi (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\tools\miniconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-axs36445\\yappi_f194abecdf2f44dab93251d8edc3af83\\setup.py'"'"'; __file__='"'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-axs36445\\yappi_f194abecdf2f44dab93251d8edc3af83\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\jaan\AppData\Local\Temp\pip-wheel-0es33nb0'
cwd: C:\Users\jaan\AppData\Local\Temp\pip-install-axs36445\yappi_f194abecdf2f44dab93251d8edc3af83\ Complete output (9 lines):
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.8
copying yappi\yappi.py -> build\lib.win32-3.8
running build_ext
building '_yappi' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Failed building wheel for yappi
Running setup.py clean for yappi
Failed to build yappi
Installing collected packages: yappi
Running setup.py install for yappi ... error
ERROR: Command errored out with exit status 1:
command: 'c:\tools\miniconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-axs36445\\yappi_f194abecdf2f44dab93251d8edc3af83\\setup.py'"'"'; __file__='"'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-axs36445\\yappi_f194abecdf2f44dab93251d8edc3af83\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\jaan\AppData\Local\Temp\pip-record-oiw8mj74\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\jaan\AppData\Roaming\Python\Python38\Include\yappi'
cwd: C:\Users\jaan\AppData\Local\Temp\pip-install-axs36445\yappi_f194abecdf2f44dab93251d8edc3af83\
Complete output (9 lines):
running install
running build
running build_py
creating build
creating build\lib.win32-3.8
copying yappi\yappi.py -> build\lib.win32-3.8
running build_ext
building '_yappi' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\tools\miniconda3\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-axs36445\\yappi_f194abecdf2f44dab93251d8edc3af83\\setup.py'"'"'; __file__='"'"'C:\\Users\\jaan\\AppData\\Local\\Temp\\pip-install-axs36445\\yappi_f194abecdf2f44dab93251d8edc3af83\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\jaan\AppData\Local\Temp\pip-record-oiw8mj74\install-record.txt' --single-version-externally-managed --user --prefix= --compile --install-headers 'C:\Users\jaan\AppData\Roaming\Python\Python38\Include\yappi' Check the logs for full command output.
Hi. Just writing a quick answer in a bit hurry but did you happen to check this issue -> https://github.com/sumerc/yappi/issues/45
Another quick answer: I think in the second one, you managed to install proper VC++ version but you get a different error and there is a candidate solution here -> https://github.com/Azure/azure-iot-sdk-python/issues/82
Compiling on Windows is a bit cryptic these days. Hope above helps!
Downloading and installing both of these will work.
Just installed yappi
on a new windows machine, can confirm that it wasn't enough to have the latest build tools/MSVC, but I also had to have the Windows 11 SDK installed as well.
We have recently released a new version of yappi (1.3.6) that has wheels compiled for most of the platforms. I would suggest using that version.
Closing this issue as there is nothing todo for this on yappi side and probably the issue is already fixed since we have prebuilt binaries now.
Any ideas how to fix this?
I first got an error saying to install Microsoft Visual Studio C++ 14.0 or later build tools. I installed them from https://visualstudio.microsoft.com/visual-cpp-build-tools/
Here is the checkbox I ticked for the build tools. Which version of MSVC does yappi require?