Closed mtreinish closed 4 years ago
@atilag It also looks like building wheel manually is broken unless you install requirements first too. Using anaconda I have
conda create -n test-env python=3.7 -y; conda activate test-env
python setup.py bdist_wheel
returns same cmake error message as @mtreinish posted.
But running the following builds successfully:
conda create -n test-env python=3.7 -y; conda activate test-env
pip install -r requirements-dev.txt
python setup.py bdist_wheel
pip install dist/*
(running pip install -r requirements-dev.txt; pip install .
still fails)
Editing setup.py
to include:
try:
import numpy
except ImportError:
subprocess.call([sys.executable, '-m', 'pip', 'install', 'numpy>=1.13'])
and
requirements = [
"numpy>=1.13",
"scipy>=1.0",
"pybind11>=2.4",
"cython>=0.27.1"
]
and
setup_requires=['scikit-build', 'cmake', 'Cython', 'pybind11>2.4', 'numpy>=1.13']
got me a little bit further (bdist_wheel build works), and pip install .
now gives following error:
-- Configuring done
-- Generating done
-- Build files have been written to: /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-req-build-a5quw6vk/_skbuild/macosx-10.9-x86_64-3.7/cmake-build
[1/38] Generating CXX source src/simulators/open_pulse/numeric_integrator_wrapper.cxx
[2/38] Generating CXX source src/simulators/open_pulse/test_python_to_cpp.cxx
[3/38] Building CXX object qiskit/providers/aer/backends/wrappers/CMakeFiles/controller_wrappers.dir/bindings.cc.o
FAILED: qiskit/providers/aer/backends/wrappers/CMakeFiles/controller_wrappers.dir/bindings.cc.o
ccache /Library/Developer/CommandLineTools/usr/bin/c++ -Dcontroller_wrappers_EXPORTS -I../../../src/third-party/macos/lib -I/Users/cjwood/anaconda3/envs/test-env2/include/python3.7m -I/Users/cjwood/anaconda3/envs/test-env2/include -I../../../src -I../../../src/third-party/win64/lib -I../../../src/third-party/linux/lib -isystem ../../../src/third-party/headers -fvisibility=hidden -O3 -DNDEBUG -arch x86_64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -fvisibility=hidden -Xpreprocessor -fopenmp -std=gnu++14 -MD -MT qiskit/providers/aer/backends/wrappers/CMakeFiles/controller_wrappers.dir/bindings.cc.o -MF qiskit/providers/aer/backends/wrappers/CMakeFiles/controller_wrappers.dir/bindings.cc.o.d -o qiskit/providers/aer/backends/wrappers/CMakeFiles/controller_wrappers.dir/bindings.cc.o -c ../../../qiskit/providers/aer/backends/wrappers/bindings.cc
../../../qiskit/providers/aer/backends/wrappers/bindings.cc:3:10: fatal error: 'pybind11/pybind11.h' file not found
#include <pybind11/pybind11.h>
^~~~~~~~~~~~~~~~~~~~~
1 error generated.
[4/38] Generating CXX source qiskit/providers/aer/openpulse/cy/memory.cxx
[5/38] Generating CXX source qiskit/providers/aer/openpulse/cy/utils.cxx
[6/38] Generating CXX source qiskit/providers/aer/openpulse/cy/channel_value.cxx
[7/38] Generating CXX source qiskit/providers/aer/openpulse/cy/measure.cxx
[8/38] Building CXX object src/simulators/open_pulse/CMakeFiles/numeric_integrator_wrapper.dir/numeric_integrator_wrapper.cxx.o
In file included from src/simulators/open_pulse/numeric_integrator_wrapper.cxx:612:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning is a language extension [-Wpedantic]
#warning "Using deprecated NumPy API, disable it with " \
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
In file included from src/simulators/open_pulse/numeric_integrator_wrapper.cxx:613:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/ufuncobject.h:4:
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:19:5: warning: 'NPY_INLINE_MATH' is not defined, evaluates to 0 [-Wundef]
#if NPY_INLINE_MATH
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:263:5: warning: 'HAVE___BUILTIN_ISNAN' is not defined, evaluates to 0 [-Wundef]
#if HAVE___BUILTIN_ISNAN
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:279:5: warning: 'HAVE___BUILTIN_ISFINITE' is not defined, evaluates to 0 [-Wundef]
#if HAVE___BUILTIN_ISFINITE
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:294:5: warning: 'HAVE___BUILTIN_ISINF' is not defined, evaluates to 0 [-Wundef]
#if HAVE___BUILTIN_ISINF
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:642:5: warning: 'NPY_INLINE_MATH' is not defined, evaluates to 0 [-Wundef]
#if NPY_INLINE_MATH
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1705:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1707:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1709:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1711:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1713:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1715:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1717:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1726:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1732:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1738:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1744:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1750:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1756:9: warning: use of the 'fallthrough' attribute is a C++17 extension [-Wc++17-extensions]
CYTHON_FALLTHROUGH;
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:265:36: note: expanded from macro 'CYTHON_FALLTHROUGH'
#define CYTHON_FALLTHROUGH [[fallthrough]]
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1814:74: warning: comparing floating point with == or != is unsafe [-Wfloat-equal]
__pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_t); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 30, __pyx_L1_error)
~~~~~~~~~ ^ ~~~~~~~~~~
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:806:43: note: expanded from macro 'unlikely'
#define unlikely(x) __builtin_expect(!!(x), 0)
^
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:5249:18: warning: cast from 'char *' to 'PyObject **' (aka '_object **') increases required alignment from 1 to 8 [-Wcast-align]
fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:1267:47: note: expanded from macro '__Pyx_PyFrame_GetLocalsplus'
(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/simulators/open_pulse/numeric_integrator_wrapper.cxx:5678:42: warning: cast from 'char *' to 'PyObject **' (aka '_object **') increases required alignment from 1 to 8 [-Wcast-align]
dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 warnings generated.
[9/38] Generating CXX source qiskit/providers/aer/openpulse/qutip_lite/cy/spmatfuncs.cxx
[10/38] Generating CXX source qiskit/providers/aer/openpulse/qutip_lite/cy/spconvert.cxx
[11/38] Generating CXX source qiskit/providers/aer/openpulse/qutip_lite/cy/spmath.cxx
[12/38] Generating CXX source qiskit/providers/aer/openpulse/qutip_lite/cy/sparse_utils.cxx
[13/38] Building CXX object src/simulators/open_pulse/CMakeFiles/numeric_integrator_wrapper.dir/numeric_integrator.cpp.o
In file included from ../../../src/simulators/open_pulse/numeric_integrator.cpp:9:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning is a language extension [-Wpedantic]
#warning "Using deprecated NumPy API, disable it with " \
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
In file included from ../../../src/simulators/open_pulse/numeric_integrator.cpp:16:
../../../src/simulators/open_pulse/python_to_cpp.hpp:41:1: warning: control may reach end of non-void function [-Wreturn-type]
};
^
../../../src/simulators/open_pulse/numeric_integrator.cpp:126:23: warning: unused variable 'numpy_initialized' [-Wunused-variable]
const static auto numpy_initialized = init_numpy();
^
4 warnings generated.
[14/38] Building CXX object src/simulators/open_pulse/CMakeFiles/test_python_to_cpp.dir/test_python_to_cpp.cxx.o
In file included from src/simulators/open_pulse/test_python_to_cpp.cxx:621:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning is a language extension [-Wpedantic]
#warning "Using deprecated NumPy API, disable it with " \
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
In file included from src/simulators/open_pulse/test_python_to_cpp.cxx:622:
In file included from /private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/ufuncobject.h:4:
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:19:5: warning: 'NPY_INLINE_MATH' is not defined, evaluates to 0 [-Wundef]
#if NPY_INLINE_MATH
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:263:5: warning: 'HAVE___BUILTIN_ISNAN' is not defined, evaluates to 0 [-Wundef]
#if HAVE___BUILTIN_ISNAN
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:279:5: warning: 'HAVE___BUILTIN_ISFINITE' is not defined, evaluates to 0 [-Wundef]
#if HAVE___BUILTIN_ISFINITE
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:294:5: warning: 'HAVE___BUILTIN_ISINF' is not defined, evaluates to 0 [-Wundef]
#if HAVE___BUILTIN_ISINF
^
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/normal/lib/python3.7/site-packages/numpy/core/include/numpy/npy_math.h:642:5: warning: 'NPY_INLINE_MATH' is not defined, evaluates to 0 [-Wundef]
#if NPY_INLINE_MATH
^
In file included from src/simulators/open_pulse/test_python_to_cpp.cxx:623:
In file included from ../../../src/simulators/open_pulse/test_python_to_cpp.hpp:25:
../../../src/simulators/open_pulse/python_to_cpp.hpp:41:1: warning: control may reach end of non-void function [-Wreturn-type]
};
^
src/simulators/open_pulse/test_python_to_cpp.cxx:5508:18: warning: cast from 'char *' to 'PyObject **' (aka '_object **') increases required alignment from 1 to 8 [-Wcast-align]
fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/simulators/open_pulse/test_python_to_cpp.cxx:1260:47: note: expanded from macro '__Pyx_PyFrame_GetLocalsplus'
(assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/simulators/open_pulse/test_python_to_cpp.cxx:6002:42: warning: cast from 'char *' to 'PyObject **' (aka '_object **') increases required alignment from 1 to 8 [-Wcast-align]
dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 warnings generated.
ninja: build stopped: subcommand failed.
File "/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/overlay/lib/python3.7/site-packages/skbuild/setuptools_wrap.py", line 577, in setup
cmkr.make(make_args, env=env)
File "/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/overlay/lib/python3.7/site-packages/skbuild/cmaker.py", line 482, in make
os.path.abspath(CMAKE_BUILD_DIR())))
--------------------------------------------------------------------------------
-- Trying "Ninja" generator
--------------------------------
---------------------------
----------------------
-----------------
------------
-------
--
--
-------
------------
-----------------
----------------------
---------------------------
--------------------------------
-- Trying "Ninja" generator - success
--------------------------------------------------------------------------------
Traceback (most recent call last):
An error occurred while building with CMake.
Command:
"/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-build-env-jy4ap9be/overlay/lib/python3.7/site-packages/cmake/data/CMake.app/Contents/bin/cmake" "--build" "." "--target" "install" "--config" "Release" "--"
Source directory:
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-req-build-a5quw6vk
Working directory:
/private/var/folders/lp/ftt3j6qs7s90j6h9wszq3jcw0000gn/T/pip-req-build-a5quw6vk/_skbuild/macosx-10.9-x86_64-3.7/cmake-build
Please see CMake's output for more information.
----------------------------------------
ERROR: Failed building wheel for qiskit-aer
Running setup.py clean for qiskit-aer
Failed to build qiskit-aer
ERROR: Could not build wheels for qiskit-aer which use PEP 517 and cannot be installed directly
Oh, I don't think building without previously installing dependencies have ever worked, it was a mandatory step.
We can surely change setup.py
to avoid this and force installing all deps at pip installation time.
The problem here is because the way we look for pybind
includes in the build system is not compatible with how pip install works (by creating temporary directories where everything is installed).
Will try to look for a fix
I have been playing around with setup.py
and can confirm underlying issue is pybind11 headers.
If i modify setup to fix requirements:
requirements = [
'numpy>=1.13',
'scipy>=1.0',
'cython>=0.27.1',
'pybind11>=2.4'
]
setup_requirements = requirements + [
'scikit-build',
'cmake'
]
Calling pip install .
fails due to not being able to find hte pybind11
C++ headers. It seems that
calling subprocess.call([sys.executable, '-m', 'pip', 'install', 'pybind11>=2.4'])
we currently have in the setup.py
isn't doing anything (must put the headers in a temporary location that CMake cant find)
Calling pip install pybind11; pip install .
works.
We probably need to fix this in the CMakeLists and remove the pip call from setupy.py?
This might be useful. An example pybind11 build project from scikit-build repo:
Our travis script should really be updated so that the compile stage tests without installing terra and requirements first (ie python setup.py bdist_wheel in a clean python env)
Informations
What is the current behavior?
Attempting to pip install a bare repo no longer works since the pulse simulator branch was merged into master with: https://github.com/Qiskit/qiskit-aer/commit/40d903797e497c281bbb6fb42d1e45ccfcc482d7
Running from a clean local clone of the aer repo yields:
Steps to reproduce the problem
pip install git+https://github.com/Qiskit/qiskit-aer
orWhat is the expected behavior?
Pip will build and install the aer python package
Suggested solutions
Fix the issue introduced from the pulse simulator