Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Unable to install psutil on pypy 2.7 #1827

Closed
dmoore44 opened this issue Sep 16, 2020 · 1 comment
Closed

[Windows] Unable to install psutil on pypy 2.7 #1827

dmoore44 opened this issue Sep 16, 2020 · 1 comment

Comments

@dmoore44
Copy link

I run in to linker error(s) when attempting to install psutil via pypy 2.7 with pip and from source. Here's the full output when trying to build psutil from source:

C:\Users\dmoore\Downloads\psutil-5.7.2>pypy setup.py install
running install
running bdist_egg
running egg_info
writing psutil.egg-info\PKG-INFO
writing dependency_links to psutil.egg-info\dependency_links.txt
writing requirements to psutil.egg-info\requires.txt
writing top-level names to psutil.egg-info\top_level.txt
reading manifest file 'psutil.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'psutil.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
building 'psutil._psutil_windows' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/_psutil_common.c /Fobuild\temp.win32-2.7\Release\psutil/_psutil_common.obj
_psutil_common.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/_psutil_windows.c /Fobuild\temp.win32-2.7\Release\psutil/_psutil_windows.obj
_psutil_windows.c
psutil/_psutil_windows.c(58): warning C4013: 'PyErr_SetFromWindowsErr' undefined; assuming extern returning int
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/process_utils.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/process_utils.obj
process_utils.c
psutil/arch/windows/process_utils.c(44): warning C4013: 'PyErr_SetFromWindowsErr' undefined; assuming extern returning int
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/process_info.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/process_info.obj
process_info.c
psutil/arch/windows/process_info.c(287): warning C4013: 'PyErr_SetFromWindowsErr' undefined; assuming extern returning int
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/process_handles.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/process_handles.obj
process_handles.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/disk.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/disk.obj
disk.c
psutil/arch/windows/disk.c(151): warning C4013: 'PyErr_SetFromWindowsErr' undefined; assuming extern returning int
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/net.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/net.obj
net.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/cpu.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/cpu.obj
cpu.c
psutil/arch/windows/cpu.c(26): warning C4013: 'PyErr_SetFromWindowsErr' undefined; assuming extern returning int
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/security.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/security.obj
security.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/services.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/services.obj
services.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/socks.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/socks.obj
socks.c
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=572 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x0602 -D_AVAIL_WINVER_=0x0602 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:\pypy2.7\include /Tcpsutil/arch/windows/wmi.c /Fobuild\temp.win32-2.7\Release\psutil/arch/windows/wmi.obj
wmi.c
psutil/arch/windows/wmi.c(74): warning C4013: 'PyErr_SetFromWindowsErr' undefined; assuming extern returning int
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\pypy2.7\libs psapi.lib kernel32.lib advapi32.lib shell32.lib netapi32.lib ws2_32.lib PowrProf.lib pdh.lib /EXPORT:init_psutil_windows build\temp.win32-2.7\Release\psutil/_psutil_common.obj build\temp.win32-2.7\Release\psutil/_psutil_windows.obj build\temp.win32-2.7\Release\psutil/arch/windows/process_utils.obj build\temp.win32-2.7\Release\psutil/arch/windows/process_info.obj build\temp.win32-2.7\Release\psutil/arch/windows/process_handles.obj build\temp.win32-2.7\Release\psutil/arch/windows/disk.obj build\temp.win32-2.7\Release\psutil/arch/windows/net.obj build\temp.win32-2.7\Release\psutil/arch/windows/cpu.obj build\temp.win32-2.7\Release\psutil/arch/windows/security.obj build\temp.win32-2.7\Release\psutil/arch/windows/services.obj build\temp.win32-2.7\Release\psutil/arch/windows/socks.obj build\temp.win32-2.7\Release\psutil/arch/windows/wmi.obj /OUT:build\lib.win32-2.7\psutil\_psutil_windows.pypy-73.pyd /IMPLIB:build\temp.win32-2.7\Release\psutil\_psutil_windows.pypy-73.lib /MANIFEST /MANIFESTFILE:build\temp.win32-2.7\Release\psutil\_psutil_windows.pypy-73.pyd.manifest
   Creating library build\temp.win32-2.7\Release\psutil\_psutil_windows.pypy-73.lib and object build\temp.win32-2.7\Release\psutil\_psutil_windows.pypy-73.exp
cpu.obj : error LNK2001: unresolved external symbol _PyErr_SetFromWindowsErr
wmi.obj : error LNK2001: unresolved external symbol _PyErr_SetFromWindowsErr
_psutil_windows.obj : error LNK2001: unresolved external symbol _PyErr_SetFromWindowsErr
process_utils.obj : error LNK2001: unresolved external symbol _PyErr_SetFromWindowsErr
process_info.obj : error LNK2001: unresolved external symbol _PyErr_SetFromWindowsErr
disk.obj : error LNK2001: unresolved external symbol _PyErr_SetFromWindowsErr
build\lib.win32-2.7\psutil\_psutil_windows.pypy-73.pyd : fatal error LNK1120: 1 unresolved externals
←[91mVisualStudio is not installed; get it from http://www.microsoft.com/en-us/download/details.aspx?id=44266←[0m
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\link.exe' failed with exit status 1120

I know there's a message stating that VisualStudio is not installed, but it is

C:\Users\dmoore\Downloads\psutil-5.7.2>which link.exe
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.exe
@giampaolo
Copy link
Owner

This was fixed in #1872 (but there's no release yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants