skip to Main Content

I am trying to run a .ipynb file using pypy with vscode however when I try to run one of the cell, I have an error saying I need to install the ipykernel package but when I do install the package, I have the following error:

 error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\link.exe' failed with exit code 1120
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for psutil
Failed to build psutil
ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects

Does someone have an idea on what is the issue there, it will greatly help me.

I’ve tried using older versions of pip like in this topic but as said in the error message it is not a problem with pip so it didn’t work.

2

Answers


  1. Chosen as BEST ANSWER

    When I use the -v option I get the following error:

    "C:Program Files (x86)Microsoft Visual Studio2022BuildToolsVCToolsMSVC14.38.33130binHostX86x64cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=596 -DPSUTIL_WINDOWS=1 -D_WIN32_WINNT=0x01000 -D_AVAIL_WINVER_=0x01000 -D_CRT_SECURE_NO_WARNINGS -DPSAPI_VERSION=1 -IC:UsersvsadrOneDriveDocumentspypy3.10-v7.3.13-win64include -IC:UsersvsadrOneDriveDocumentspypy3.10-v7.3.13-win64Include "-IC:Program Files (x86)Microsoft Visual Studio2022BuildToolsVCToolsMSVC14.38.33130include" "-IC:Program Files (x86)Microsoft Visual Studio2022BuildToolsVCAuxiliaryVSinclude" /Tcpsutil/_psutil_common.c /Fobuildtemp.win-amd64-pypy310Releasepsutil/_psutil_common.obj
      _psutil_common.c
     C:UsersvsadrOneDriveDocumentspypy3.10-v7.3.13-win64includepyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
      error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\cl.exe' failed with exit code 2
      error: subprocess-exited-with-error
    
      × Building wheel for psutil (pyproject.toml) did not run successfully.
      Γöé exit code: 1
      Γò░ΓöÇ> See above for output.
    
      `=note: This error originates from a subprocess, and is likely not a problem with pip.
      full command: 'C:UsersvsadrOneDriveDocumentspypy3.10-v7.3.13-win64pypy3.10.exe' 'C:UsersvsadrOneDriveDocumentspypy3.10-v7.3.13-win64libsite-packagespip_vendorpyproject_hooks_in_process_in_process.py build_wheel 'C:UsersvsadrAppDataLocalTemptmp9xfas7or'
      cwd: C:UsersvsadrAppDataLocalTemppip-install-u8yfbk4bpsutil_49cdd8422b404b06b4f7c0fad8314455
      Building wheel for psutil (pyproject.toml) ... error
      ERROR: Failed building wheel for psutil
    Successfully built tornado
    Failed to build psutil
    ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects
    

    I hope this helps someone understanding the issue


  2. In the complete error message, you should remind you to install Microsoft Visual C++ Build Tools. Then try the following steps:

    1. Upgrade pip and setuptools
      pip install --upgrade pip
      pip install --upgrade setuptools
      
    2. Install psutil alone
    3. Or download psutil to local installation
      pip install path/to/downloaded_wheel.whl
      
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search