1

Need Help I want to install pandas-profiling in python 3.8.2 but when i try to install the package i am facing errors.

pip install pandas-profiling

I am getting this error

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/ ---------------------------------------- ERROR: Command errored out with exit status 1: 'f:\data analaysis\fbi crime rate\newenv\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Manish\\AppData\\Local\\Temp\\pip-install-vz1xsz_s\\astropy\\setup.py'"'"'; __file__='"'"'C:\\Users\\Manish\\AppData\\Local\\Temp\\pip-install-vz1xsz_s\\astropy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Manish\AppData\Local\Temp\pip-record-011lkvam\install-record.txt' --single-version-externally-managed --compile --install-headers 'f:\data analaysis\fbi crime rate\newenv\include\site\python3.8\astropy' Check the logs for full command output.

Sajjan Karn
  • 50
  • 1
  • 7
  • Have you installed Microsoft Visual C++ 14.0 as it says? – horse Jun 03 '20 at 05:10
  • No this error is common while installing some libraries – Sajjan Karn Jun 03 '20 at 05:11
  • Ok. Have you checked out the top answers from these other people having the same issue? https://stackoverflow.com/questions/44951456/pip-error-microsoft-visual-c-14-0-is-required https://stackoverflow.com/questions/29846087/microsoft-visual-c-14-0-is-required-unable-to-find-vcvarsall-bat – horse Jun 03 '20 at 05:13
  • it wasn't compulsory to install the visual c++ 14..... whenever i face errors while installing some packages i install via the .whl file so i looked for this library to but its not available – Sajjan Karn Jun 03 '20 at 05:16

1 Answers1

1

Visual Studio changed the Build Tools from being C++ specific in late 2017. Thus newer Visual Studio versions work in place of older versions.

Install using any ONE of these choices:

  1. Microsoft Build Tools for Visual Studio.

  2. Alternative link to Microsoft Build Tools for Visual Studio.

  3. Offline installer: vs_buildtools.exe
  4. Visual C++ 2015 Build Tools

Select: Workloads → Desktop development with C++, then for Individual Components, select only:

  • Windows 10 SDK
  • C++ x64/x86 build tools

The build tools allow using MSVC “cl.exe” C / C++ compiler from the command line.

Why this is necessary?

Windows Python needs Visual C++ libraries installed via the SDK to build code, such as via setuptools.extension.Extension or numpy.distutils.core.Extension. For example, building f2py modules in Windows with Python requires Visual C++ SDK as installed above. On Linux and Mac, the C++ libraries are installed with the compiler.

Hamed Rostami
  • 1,670
  • 14
  • 16