我正在尝试在Win10上安装qiskit。
我输入了我的admin cmd:
pip install qiskit
对于terra,ignis和aqua来说都很好。 但是,安装aer时出现C编译器问题。 这是错误消息:
Microsoft Windows [version 10.0.18363.959]
(c) 2019 Microsoft Corporation. Tous droits réservés.
C:\WINDOWS\system32>pip install qiskit
Processing c:\users\bohro\appdata\local\pip\cache\wheels\4d\00\27\1b79b2da1898a0d95508661eb1922c6d44be088f2719708a98\qiskit-0.19.6-py3-none-any.whl
Requirement already satisfied: qiskit-ignis==0.3.3 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit) (0.3.3)
Requirement already satisfied: qiskit-ibmq-provider==0.7.2 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit) (0.7.2)
Requirement already satisfied: qiskit-aqua==0.7.3 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit) (0.7.3)
Requirement already satisfied: qiskit-terra==0.14.2 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit) (0.14.2)
Collecting qiskit-aer==0.5.2
Using cached qiskit-aer-0.5.2.tar.gz (10.3 MB)
Requirement already satisfied: scipy!=0.19.1,>=0.19 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ignis==0.3.3->qiskit) (1.5.2)
Requirement already satisfied: setuptools>=40.1.0 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ignis==0.3.3->qiskit) (49.2.1)
Requirement already satisfied: scikit-learn>=0.17 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ignis==0.3.3->qiskit) (0.23.2)
Requirement already satisfied: numpy>=1.13 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ignis==0.3.3->qiskit) (1.19.1)
Requirement already satisfied: requests>=2.19 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ibmq-provider==0.7.2->qiskit) (2.22.0)
Requirement already satisfied: nest-asyncio!=1.1.0,>=1.0.0 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ibmq-provider==0.7.2->qiskit) (1.4.0)
Requirement already satisfied: python-dateutil>=2.8.0 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ibmq-provider==0.7.2->qiskit) (2.8.1)
Requirement already satisfied: urllib3>=1.21.1 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ibmq-provider==0.7.2->qiskit) (1.25.7)
Requirement already satisfied: requests-ntlm>=1.1.0 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ibmq-provider==0.7.2->qiskit) (1.1.0)
Requirement already satisfied: websockets<8,>=7 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-ibmq-provider==0.7.2->qiskit) (7.0)
Requirement already satisfied: fastdtw in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aqua==0.7.3->qiskit) (0.3.4)
Requirement already satisfied: h5py in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aqua==0.7.3->qiskit) (2.10.0)
Requirement already satisfied: networkx>=2.2 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aqua==0.7.3->qiskit) (2.4)
Requirement already satisfied: sympy>=1.3 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aqua==0.7.3->qiskit) (1.5.1)
Requirement already satisfied: quandl in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aqua==0.7.3->qiskit) (3.5.2)
Requirement already satisfied: docplex in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aqua==0.7.3->qiskit) (2.15.194)
Requirement already satisfied: psutil>=5 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aqua==0.7.3->qiskit) (5.7.2)
Requirement already satisfied: dlx in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aqua==0.7.3->qiskit) (1.0.4)
Requirement already satisfied: dill>=0.3 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-terra==0.14.2->qiskit) (0.3.2)
Requirement already satisfied: ply>=3.10 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-terra==0.14.2->qiskit) (3.11)
Requirement already satisfied: marshmallow<4,>=3 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-terra==0.14.2->qiskit) (3.7.1)
Requirement already satisfied: retworkx>=0.3.2 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-terra==0.14.2->qiskit) (0.4.0)
Requirement already satisfied: marshmallow-polyfield<6,>=5.7 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-terra==0.14.2->qiskit) (5.9)
Requirement already satisfied: jsonschema>=2.6 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-terra==0.14.2->qiskit) (2.6.0)
Requirement already satisfied: fastjsonschema>=2.10 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-terra==0.14.2->qiskit) (2.14.4)
Requirement already satisfied: python-constraint>=1.4 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-terra==0.14.2->qiskit) (1.4.0)
Requirement already satisfied: cython>=0.27.1 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aer==0.5.2->qiskit) (0.29.21)
Requirement already satisfied: pybind11>=2.4 in c:\program files (x86)\python\python36-32\lib\site-packages (from qiskit-aer==0.5.2->qiskit) (2.5.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\program files (x86)\python\python36-32\lib\site-packages (from scikit-learn>=0.17->qiskit-ignis==0.3.3->qiskit) (2.1.0)
Requirement already satisfied: joblib>=0.11 in c:\program files (x86)\python\python36-32\lib\site-packages (from scikit-learn>=0.17->qiskit-ignis==0.3.3->qiskit) (0.16.0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in c:\program files (x86)\python\python36-32\lib\site-packages (from requests>=2.19->qiskit-ibmq-provider==0.7.2->qiskit) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in c:\program files (x86)\python\python36-32\lib\site-packages (from requests>=2.19->qiskit-ibmq-provider==0.7.2->qiskit) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in c:\program files (x86)\python\python36-32\lib\site-packages (from requests>=2.19->qiskit-ibmq-provider==0.7.2->qiskit) (2019.11.28)
Requirement already satisfied: six>=1.5 in c:\program files (x86)\python\python36-32\lib\site-packages (from python-dateutil>=2.8.0->qiskit-ibmq-provider==0.7.2->qiskit) (1.10.0)
Requirement already satisfied: ntlm-auth>=1.0.2 in c:\program files (x86)\python\python36-32\lib\site-packages (from requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.7.2->qiskit) (1.5.0)
Requirement already satisfied: cryptography>=1.3 in c:\program files (x86)\python\python36-32\lib\site-packages (from requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.7.2->qiskit) (3.0)
Requirement already satisfied: decorator>=4.3.0 in c:\program files (x86)\python\python36-32\lib\site-packages (from networkx>=2.2->qiskit-aqua==0.7.3->qiskit) (4.4.2)
Requirement already satisfied: mpmath>=0.19 in c:\program files (x86)\python\python36-32\lib\site-packages (from sympy>=1.3->qiskit-aqua==0.7.3->qiskit) (1.1.0)
Requirement already satisfied: inflection>=0.3.1 in c:\program files (x86)\python\python36-32\lib\site-packages (from quandl->qiskit-aqua==0.7.3->qiskit) (0.5.0)
Requirement already satisfied: pandas>=0.14 in c:\program files (x86)\python\python36-32\lib\site-packages (from quandl->qiskit-aqua==0.7.3->qiskit) (0.20.3)
Requirement already satisfied: more-itertools in c:\program files (x86)\python\python36-32\lib\site-packages (from quandl->qiskit-aqua==0.7.3->qiskit) (8.4.0)
Requirement already satisfied: cffi!=1.11.3,>=1.8 in c:\program files (x86)\python\python36-32\lib\site-packages (from cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.7.2->qiskit) (1.14.1)
Requirement already satisfied: pytz>=2011k in c:\program files (x86)\python\python36-32\lib\site-packages (from pandas>=0.14->quandl->qiskit-aqua==0.7.3->qiskit) (2017.2)
Requirement already satisfied: pycparser in c:\program files (x86)\python\python36-32\lib\site-packages (from cffi!=1.11.3,>=1.8->cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.7.2->qiskit) (2.20)
Building wheels for collected packages: qiskit-aer
Building wheel for qiskit-aer (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python\python36-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bohro\\AppData\\Local\\Temp\\pip-install-l0zhdsp2\\qiskit-aer\\setup.py'"'"'; __file__='"'"'C:\\Users\\bohro\\AppData\\Local\\Temp\\pip-install-l0zhdsp2\\qiskit-aer\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\bohro\AppData\Local\Temp\pip-wheel-a8l2_d9y'
cwd: C:\Users\bohro\AppData\Local\Temp\pip-install-l0zhdsp2\qiskit-aer\
Complete output (181 lines):
--------------------------------------------------------------------------------
-- Trying "Ninja (Visual Studio 15 2017 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Programs/cygwin64/bin/cc
-- Check for working C compiler: C:/Programs/cygwin64/bin/cc - broken
CMake Error at C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/.eggs/cmake-3.18.0-py3.6-win32.egg/cmake/data/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"C:/Programs/cygwin64/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Users/bohro/Documents/Programs/ninja-win/ninja.exe cmTC_ba073 && ninja: fatal: CreateProcess: AccÞs refusÚ.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (ENABLE_LANGUAGE)
-- Configuring incomplete, errors occurred!
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja (Visual Studio 15 2017 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "Visual Studio 15 2017 v141" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 15 2017
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Visual Studio 15 2017 v141" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the JOM generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 v141)" generator - failure
--------------------------------------------------------------------------------
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.6 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
********************************************************************************
----------------------------------------
ERROR: Failed building wheel for qiskit-aer
Running setup.py clean for qiskit-aer
Failed to build qiskit-aer
DEPRECATION: Could not build wheels for qiskit-aer which do not use PEP 517. pip will fall back to legacy 'setup.py install' for these. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Installing collected packages: qiskit-aer, qiskit
Running setup.py install for qiskit-aer ... error
ERROR: Command errored out with exit status 1:
command: 'c:\program files (x86)\python\python36-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bohro\\AppData\\Local\\Temp\\pip-install-l0zhdsp2\\qiskit-aer\\setup.py'"'"'; __file__='"'"'C:\\Users\\bohro\\AppData\\Local\\Temp\\pip-install-l0zhdsp2\\qiskit-aer\\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\bohro\AppData\Local\Temp\pip-record-di0j_g0q\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files (x86)\python\python36-32\Include\qiskit-aer'
cwd: C:\Users\bohro\AppData\Local\Temp\pip-install-l0zhdsp2\qiskit-aer\
Complete output (181 lines):
--------------------------------------------------------------------------------
-- Trying "Ninja (Visual Studio 15 2017 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/Programs/cygwin64/bin/cc
-- Check for working C compiler: C:/Programs/cygwin64/bin/cc - broken
CMake Error at C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/.eggs/cmake-3.18.0-py3.6-win32.egg/cmake/data/share/cmake-3.18/Modules/CMakeTestCCompiler.cmake:66 (message):
The C compiler
"C:/Programs/cygwin64/bin/cc"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Users/bohro/Documents/Programs/ninja-win/ninja.exe cmTC_762f9 && ninja: fatal: CreateProcess: AccÞs refusÚ.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (ENABLE_LANGUAGE)
-- Configuring incomplete, errors occurred!
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja (Visual Studio 15 2017 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "Visual Studio 15 2017 v141" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 15 2017
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred!
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Visual Studio 15 2017 v141" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the NMake generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles (Visual Studio 15 2017 v141)" generator - failure
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 v141)" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
Not searching for unused variables given on the command line.
-- The C compiler identification is unknown
CMake Error at CMakeLists.txt:3 (ENABLE_LANGUAGE):
The CMAKE_C_COMPILER:
cl
is not a full path and was not found in the PATH.
To use the JOM generator with Visual C++, cmake must be run from a shell
that can use the compiler cl from the command line. This environment is
unable to invoke the cl compiler. To fix this problem, run cmake from the
Visual Studio Command Prompt (vcvarsall.bat).
Tell CMake where to find the compiler by setting either the environment
variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
the compiler, or to the compiler name if it is in the PATH.
-- Configuring incomplete, errors occurred!
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/bohro/AppData/Local/Temp/pip-install-l0zhdsp2/qiskit-aer/_cmake_test_compile/build/CMakeFiles/CMakeError.log".
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "NMake Makefiles JOM (Visual Studio 15 2017 v141)" generator - failure
--------------------------------------------------------------------------------
********************************************************************************
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.6 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
********************************************************************************
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\program files (x86)\python\python36-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bohro\\AppData\\Local\\Temp\\pip-install-l0zhdsp2\\qiskit-aer\\setup.py'"'"'; __file__='"'"'C:\\Users\\bohro\\AppData\\Local\\Temp\\pip-install-l0zhdsp2\\qiskit-aer\\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\bohro\AppData\Local\Temp\pip-record-di0j_g0q\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\program files (x86)\python\python36-32\Include\qiskit-aer' Check the logs for full command output.
C:\WINDOWS\system32>
据我了解,该问题与cygwin有关(它已经给我造成了很多麻烦-不再使用它,由于大学项目需要而暂时保留它)。我已经安装了Cmake,我可以打开cmake-gui。 但是我不知道如何让pip使用此编译器。
此外,与错误消息所说的相反,我确实有Visual Studio ...
感谢您的帮助, Kal8578
答案 0 :(得分:1)
这里的问题是您使用的是32位版本的python。 Qiskit Aer仅作为Win64的pypi上的预编译二进制文件发布,因此,当您运行radioSection.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup group1, int checkedId1) {
switch (checkedId1) {
case R.id.rbSr://radiobuttonID
//do what you want
break;
case R.id.rbJr://radiobuttonID
//do what you want
break;
}
}
});
时,pip会查看qiskit-aer的pypi上可用的预编译二进制文件,并且看不到与它运行的python win32兼容的任何二进制文件。从。然后,它退回到使用sdist(源程序包)并尝试从源代码安装它。不幸的是,该构建系统有点混乱,尤其是在Windows上,并且在没有人工干预的情况下几乎无法工作。您实际上不需要anaconda即可轻松地在Windows上仅安装64位版本的python。
答案 1 :(得分:0)
好的,这是我找到的解决方法。
免责声明:此解决方案并不完美,因为它要求您安装另一个Python /完整地重新安装Python。
1 /下载Anaconda 3,并将其安装用于64位Python 3.8。
2 /通过Anaconda Powershell提示符(而不是通常的cmd),pip安装qiskit。
3 /您应该能够在Anaconda Jupyter笔记本中运行qiskit(确保您使用Anaconda的Jupyter,而不是先前安装的另一个Jupyter)。
这就是我的“解决方案”。显然这并不完美,好像(像我一样)您已经有一个非Anaconda Python并将其用于某些任务,最终却拥有了两个Python,这总体而言不是一件好事,因为它可能会引起冲突。 如果您不太希望完全卸载Python,然后执行上述步骤,那么如果您想在自己的笔记本电脑上运行qiskit,那是一件好事。
(由于此解决方案的主要缺陷是需要再次安装Python,所以我仍然对可以帮助我解决最初问题的任何想法持开放态度。感谢Kal8578)