0

I'm trying to install a package on python (pip install basedosdados -U) and I get the following message: error:

Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.mirosoft.com/visual-cpp-build-tools/

After installing it and ticking this enter image description here (as suggested by another thread I read), I now get the following error message:

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

Any suggestions on how to proceed?

Thanks a lot!

I tried many things, just installing it without ticking the box previously mentioned also does not work.

Matheus
  • 1
  • 1

2 Answers2

0

Did you try to install the whl instead of the tar.gz? A whl is the "compiled" finished version of the package, so it should be able not to try to build it at all.

You can use pip install basedosdados -U --prefer-binary or just manually installing from pypi

Barak Fatal
  • 158
  • 8
  • Hi Barak, when running pip install basedosdados -U --prefer-binary I get the same error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2" – Matheus Jan 30 '23 at 13:14
  • did you try to install the wheel as well? – Barak Fatal Jan 30 '23 at 13:54
  • sorry, I have got no experience with Python nor the Command Prompt. Could you elaborate on how i could install the wheel? Is it using the Command Prompt? – Matheus Jan 30 '23 at 14:57
  • I believe to have installed wheel ( pip install whl). Afterwards I ran the code again and got the same error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\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 – Matheus Jan 30 '23 at 15:04
0

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 have encountered similar problems. The solution is to install 64-bit pandas instead of 32-bit.

You can read the installation page and select the appropriate version to install.

MingJie-MSFT
  • 5,569
  • 1
  • 2
  • 13