3
$\begingroup$

I tried to follow the web instructions to load Qiskit, including VC++ 2017 Redistributable, but I get many errors upon installation. The gist seems to be that VC++ 2017 wasn't found. Some results coped below - any suggestions?

=========================================================
.
.
.
  Building wheel for qiskit-aer (setup.py) ... error
  ERROR: Command errored out with exit status 1:
.
.
.
.
  --------------------------------------------------------------------------------
  -- Trying "Ninja (Visual Studio 15 2017 Win64 v141)" generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
.
.
.
.
  ----------------------------------------
  ERROR: Failed building wheel for qiskit-aer
  Running setup.py clean for qiskit-aer
  Building wheel for qiskit-terra (setup.py) ... error
  ERROR: Command errored out with exit status 1:
.
.
.
.
    scikit-build could not get a working generator for your system. Aborting build.

Building windows wheels for Python 3.8 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":

  https://visualstudio.microsoft.com/vs/
$\endgroup$
  • 2
    $\begingroup$ Hi @Dave! Could you provide more details, like the link of the webpage you're following, OS, and full log? Thanks! $\endgroup$ – C. Kang Nov 28 at 0:02
  • $\begingroup$ Hi C.! Thanks for your reply. I was following the directions at qiskit.org/documentation/install.html, I am using Windows10. I'd like to attach my log but can't see how to do that; if you give me an email, I'll send it. $\endgroup$ – DaveRDen Nov 28 at 20:02
  • $\begingroup$ Is there any way to send or post a full log of the problem (74000 characters)? $\endgroup$ – DaveRDen Dec 2 at 20:40
  • $\begingroup$ Sorry for the late reply! I'd recommend posting the log to pastebin then sharing the link. What step in installation does it fail? $\endgroup$ – C. Kang Dec 3 at 1:32
  • $\begingroup$ thanks for the reply! I have put the log at pastebin.com/ys0c3DY3, the first error reads, Building wheel for qiskit-aer (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'C:\Users\DaveR\AppData\Local\conda\conda\envs\Env2_for_QISkit\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\DaveR\\AppData\\Local\\Temp\\pip-install-1oanpuze\\qiskit- $\endgroup$ – DaveRDen Dec 4 at 17:52
0
$\begingroup$

You are probably using Python 3.8. Qiskit only works with Python 3.5, 3.6 and 3.7 - see here for details

I had the same problem. After downgrading to Python 3.7.3 and pip 19.1.1 it still gave an error - it could not resolve a path to VC++ 2017 Redistributable for fastdtw.

For me it worked to hack it like this:

  1. Find where you have instaleed vcruntime140.dll. I found a copy in %USERPROFILE%\Anaconda3\envs\<<environment_name>>\vcruntime140.dll
  2. Open the file %USERPROFILE%\Anaconda3\envs\<<environment_name>>\Lib\site-packages\setuptools\msvc.py
  3. Edit the function def VCRuntimeRedist(self) to return the path to vcruntime140.dll (don't forget to escape the \s)
  4. run pip install qiskit
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.