I was installing the editable version of qiskit-terra from source in my conda environment using the following command

pip install -e .

and I got the following error:

ERROR: Command errored out with exit status 1:
 command: 'C:\Users\Tanya Garg\Anaconda3\envs\fixissueenv\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Tanya Garg\\qiskit-terra\\setup.py'"'"'; __file__='"'"'C:\\Users\\Tanya Garg\\qiskit-terra\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
     cwd: C:\Users\Tanya Garg\qiskit-terra\
Complete output (13 lines):
running develop
running egg_info
writing qiskit_terra.egg-info\PKG-INFO
writing dependency_links to qiskit_terra.egg-info\dependency_links.txt
writing requirements to qiskit_terra.egg-info\requires.txt
writing top-level names to qiskit_terra.egg-info\top_level.txt
reading manifest file 'qiskit_terra.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'test\python\pickles\*.pickle'
writing manifest file 'qiskit_terra.egg-info\SOURCES.txt'
running build_ext
building 'qiskit.transpiler.passes.routing.cython.stochastic_swap.utils' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

What does this error mean and how can I address it?


1 Answer 1


It looks like the error message suggests to install Microsoft Visual C++ 14.0 or greater by following the link: https://visualstudio.microsoft.com/visual-cpp-build-tools/ . So I would first check to see if you have Microsoft Visual C++ and what version of that you do have, and if you don't have it or have an older version, then try exiting your conda environment, installing/updating it, and installing the editable version of qiskit-terra again with the commands taken from the Qiskit documentation at https://qiskit.org/documentation/contributing_to_qiskit.html#install-qiskit-terra :

conda activate name-of-env
pip install cython
pip install -r requirements-dev.txt
pip install -e .

Make sure that you are in the qiskit-terra directory before you execute these commands.(If you have already installed cython and the developer requirements, then you can skip those commands.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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