Skip to main content
Solved

Getting " 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" when run poetry add pandas

  • 19 December 2023
  • 3 replies
  • 2219 views

Pasindu Perera
Seasoned Practitioner
Forum|alt.badge.img+2

I am getting following error during the execution of poetry add pandas command in Data Engineer Basics - Integrate course. I have attached the complete output for you reference. Prevously I got an error saying install the latest Microsoft Visual Studio C++. After installing latest Visual Studio C++ I got this error.

```

 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


  at ~\AppData\Roaming\pypoetry\venv\Lib\site-packages\poetry\installation\chef.py:164 in _prepare
      160161│                 error = ChefBuildError("\n\n".join(message_parts))
      162163if error is not None:
    → 164raise error from None
      165166return path
      167168def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with pyzmq (25.0.2) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "pyzmq (==25.0.2)"'.

 

Best answer by Ben Petree

It looks like pandas is only supported on 3.9, 3.10, and 3.11

https://pandas.pydata.org/docs/getting_started/install.html#python-version-support

View original
Did this topic help you find an answer to your question?

3 replies

Forum|alt.badge.img+2
  • Practitioner
  • 14 replies
  • December 19, 2023

Can you attach your pyproject.toml please? I think you are using python 3.12 but I’d like to try and reproduce this


Forum|alt.badge.img+2
  • Practitioner
  • 14 replies
  • Answer
  • December 19, 2023

It looks like pandas is only supported on 3.9, 3.10, and 3.11

https://pandas.pydata.org/docs/getting_started/install.html#python-version-support


Pasindu Perera
Seasoned Practitioner
Forum|alt.badge.img+2
  • Author
  • Seasoned Practitioner
  • 18 replies
  • December 20, 2023

Hi Ben issue is now resolved.

Actually the reason is python version. I have used the latest python version (3.12)

I have degraded it to 3.10 and now it it working.


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings