[Windows] Python 3.10 fails to install psutil (no wheel)

See original GitHub issue

Summary

  • OS: Windows
  • Architecture: 64bit
  • Psutil version: Trying to install 5.8.0
  • Python version: Python 3.10.0
  • Type: wheels, installation

Description

In Python 3.9.7 psutil installs without any problems, however in Python 3.10 there’s the following error. Isn’t it because there’s no whl for 3.10 yet (https://pypi.org/project/psutil/#files) and if so, could you please tell when to expect whl for 3.10?

(venv310) D:\GitHub\hs-test-python>pip install psutil
Collecting psutil
  Using cached psutil-5.8.0.tar.gz (470 kB)
Building wheels for collected packages: psutil
  Building wheel for psutil (setup.py) ... error
    ERROR: Command errored out with exit status 1:
     command: 'D:\GitHub\hs-test-python\venv310\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aaaaa\\AppData\\Local\\Temp\\pip-inst
all-kyzytdlj\\psutil_0a6563cf13fc4c41a7c096d170e3353b\\setup.py'"'"'; __file__='"'"'C:\\Users\\aaaaa\\AppData\\Local\\Temp\\pip-install-kyzytdlj\\psutil_0a6563cf13fc4c41a7c096d170e3353
b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().rep
lace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\aaaaa\AppData\Local\Temp\pip-record-59_xd10g\install-record.txt'
--single-version-externally-managed --compile --install-headers 'D:\GitHub\hs-test-python\venv310\include\site\python3.10\psutil'
         cwd: C:\Users\aaaaa\AppData\Local\Temp\pip-install-kyzytdlj\psutil_0a6563cf13fc4c41a7c096d170e3353b\
    Complete output (38 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.10
    creating build\lib.win-amd64-3.10\psutil
    copying psutil\_common.py -> build\lib.win-amd64-3.10\psutil
    copying psutil\_compat.py -> build\lib.win-amd64-3.10\psutil
    copying psutil\_psaix.py -> build\lib.win-amd64-3.10\psutil
    copying psutil\_psbsd.py -> build\lib.win-amd64-3.10\psutil
    copying psutil\_pslinux.py -> build\lib.win-amd64-3.10\psutil
    copying psutil\_psosx.py -> build\lib.win-amd64-3.10\psutil
    copying psutil\_psposix.py -> build\lib.win-amd64-3.10\psutil
    copying psutil\_pssunos.py -> build\lib.win-amd64-3.10\psutil
    copying psutil\_pswindows.py -> build\lib.win-amd64-3.10\psutil
    copying psutil\__init__.py -> build\lib.win-amd64-3.10\psutil
    creating build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\runner.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_aix.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_bsd.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_connections.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_contracts.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_linux.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_memleaks.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_misc.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_osx.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_posix.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_process.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_sunos.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_system.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_testutils.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_unicode.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\test_windows.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\__init__.py -> build\lib.win-amd64-3.10\psutil\tests
    copying psutil\tests\__main__.py -> build\lib.win-amd64-3.10\psutil\tests
    running build_ext
    building 'psutil._psutil_windows' 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: 'D:\GitHub\hs-test-python\venv310\Scripts\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\aaaa
a\\AppData\\Local\\Temp\\pip-install-kyzytdlj\\psutil_0a6563cf13fc4c41a7c096d170e3353b\\setup.py'"'"'; __file__='"'"'C:\\Users\\aaaaa\\AppData\\Local\\Temp\\pip-install-kyzytdlj\\psuti
l_0a6563cf13fc4c41a7c096d170e3353b\\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\aaaaa\AppData\Local\Temp\pip-rec
ord-59_xd10g\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\GitHub\hs-test-python\venv310\include\site\python3.10\psutil' Check the logs for fu
ll command output.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
giampaolocommented, Dec 30, 2021

New psutil 5.9.0 is out, and it includes Python 3.10 wheels.

0reactions
auvipycommented, Nov 10, 2021

thanks. if you need another helping hand let me know.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why I do get an error when installing the psutil package for ...
1 Answer 1 · Install missing package pip install wheel · Install this tools https://visualstudio.microsoft.com/visual-cpp-build-tools/ · Restart ...
Read more >
windows 10 - python 3.11.0 - error installing psutil · Issue #2165
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for psutil. Failed to...
Read more >
ERROR: Could not build wheels for psutil in Python | bobbyhadz
To solve the error "Could not build wheels for psutil", run the pip install --upgrade pip command to upgrade your pip version and...
Read more >
How to install python module psutil manually from ... - YouTube
In this video we are going to see how to install psutil module manually from whl ( wheel ) package using pip installer...
Read more >
Error while trying to install psutil package in nightly - Support
The error is shown by doing this >>> slicer.util.pip_install('psutil') ... folders/px/rkhksnnj0g91sxn5bvbrwzrc0000gn/T/pip-wheel-go9_rzxt --python-tag cp36: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found