Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe' failed with exitcode2

so I was trying to install this package Eur-Lex on Python and had this error :

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

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

I tried to find a solution on blogs or forums but it didn't work. I only have basic knowledge of Python. First of all, it was the "Microsoft Visual C++ 14.0 is required error" so I downloaded Build Tools and it works. Also tried to re-install Python after VSCode or Spyder but didn't work. Python version : 3.8.10

Any insights ?

like image 786
Hervegmz Avatar asked May 26 '26 22:05

Hervegmz


2 Answers

After fixing "Microsoft Visual C++ 14.0 is required error", I got the same issue while installing Twilio. But this works for me.

for python 3.11/12:

pip install aiohttp==3.9.0b0 

And then try again,

pip install [package]

Reference: ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects

like image 53
Arslan Rasheed Avatar answered May 28 '26 11:05

Arslan Rasheed


This happened to me. I was trying to install the dcurves package. I tried several approaches including pip install aiohttp==3.9.0b0 and python -m pip install --upgrade pip setuptools wheel, however neither worked. Downgrading from python 3.12 to 3.11 solved the problem.

like image 45
tegku Avatar answered May 28 '26 11:05

tegku



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!