From 65524153cb81f37b47760ae3221a913075307ec4 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 11 Nov 2019 10:16:51 -0500 Subject: [PATCH 01/20] Add python 3.8 support and deprecate python 3.5 This commit adds support for running aer under python 3.8. It does this by adding the trove classifiers to the package metadata and adding a test job for python 3.8 At the same time this commit starts the deprecation window for python 3.5. Python 3.5 goes end of life by upstream python in Sept. 2020. We should give our users running with python 3.5 (which is about 10% of qiskit users this year based on pypi data) fair notice that when upstream python stops supporting it we do as well. Corresponding to this change, terra is going to start raising a warning when anything from qiskit.* is imported, see: Qiskit/qiskit-terra#3268 --- .travis.yml | 13 +++++++++++++ CHANGELOG.md | 8 ++++++++ azure-pipelines.yml | 2 ++ setup.py | 3 +++ 4 files changed, 26 insertions(+) diff --git a/.travis.yml b/.travis.yml index ad4a02e9ec..9574dd14f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -102,6 +102,12 @@ jobs: # "test" stage ########################################################################### + # GNU/Linux, Python 3.8 + - stage: test + name: Python 3.8 Tests Linux + <<: *stage_linux + python: 3.8 + # GNU/Linux, Python 3.7 - stage: test name: Python 3.7 Tests Linux @@ -122,6 +128,13 @@ jobs: <<: *stage_linux python: 3.5 + - stage: test + name: Python 3.8 Tests Linux + if: type = cron + <<: *stage_osx + python: 3.8 + - PYTHON_VERSION=3.8.0 + # OSX, Python 3.7.2 (via pyenv) - stage: test name: Python 3.7 Tests OSX diff --git a/CHANGELOG.md b/CHANGELOG.md index f4838fc0a3..67af59a775 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,14 @@ Removed Fixed ----- +Deprecated +---------- + +- Python 3.5 support in qiskit-terra is deprecated. Support will be + removed on the upstream python community's end of life date for the version, + which is 09/13/2020. + + [0.3.2](https://github.com/Qiskit/qiskit-aer/compare/0.3.1...0.3.2) - 2019-10-16 =============================================================================== diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5804efd40c..73a121a3fa 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,6 +45,8 @@ jobs: python.version: '3.6' Python37: python.version: '3.7' + Python38: + python.version: '3.8' steps: - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" displayName: Add conda to PATH diff --git a/setup.py b/setup.py index b33905399b..eda298942d 100644 --- a/setup.py +++ b/setup.py @@ -47,8 +47,11 @@ def find_qiskit_aer_packages(): "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: C++", + "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", "Topic :: Scientific/Engineering", ], install_requires=requirements, From 956d0019a8a8ee0ecf45ebdc8f576938d187ad07 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 12 Nov 2019 14:20:47 -0500 Subject: [PATCH 02/20] Install numpy and scipy from conda forge For whatever reason the scipy package on the windows python 3.8 jobs is trying to build from sdist. This requires blas and lapack libraries installed because it is building the package from source. Instead of relying on pip to install scipy this just switches to using the conda-forge version of numpy and scipy which are precompiled for windows and should work fine. --- azure-pipelines.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b0eb92b2ca..8adc664117 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -56,13 +56,18 @@ jobs: call activate qiskit-aer-$(Build.BuildNumber) conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy displayName: Install Anaconda packages - condition: ne(variables['python.version'], '3.5') + condition: and(ne(variables['python.version'], '3.5'), ne(variables['python.version'], '3.8')) - script: | call activate qiskit-aer-$(Build.BuildNumber) conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% mkl conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% openblas displayName: Install Anaconda packages condition: eq(variables['python.version'], '3.5') + - script: | + call activate qiskit-aer-$(Build.BuildNumber) + conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy scipy + displayName: Install Anaconda packages + condition: eq(variables['python.version'], '3.8') - bash: | set -e source activate qiskit-aer-$(Build.BuildNumber) From 66793152cc1cf8c46376d2bff3410b1e05a89270 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 12 Nov 2019 15:34:17 -0500 Subject: [PATCH 03/20] Add conda jupyter package to 38 windows job --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8adc664117..efeb4e0138 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -66,6 +66,7 @@ jobs: - script: | call activate qiskit-aer-$(Build.BuildNumber) conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy scipy + conda install --yes --quiet --name qiskit-aer-$(Build. BuildNumber) python=%PYTHON_VERSION% jupyter displayName: Install Anaconda packages condition: eq(variables['python.version'], '3.8') - bash: | From 560f12392e52f9ac4222f49bd3f012cd37c1c21a Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 13 Nov 2019 09:33:23 -0500 Subject: [PATCH 04/20] Conda install pywin32 too --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index efeb4e0138..5130c328b3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -65,7 +65,7 @@ jobs: condition: eq(variables['python.version'], '3.5') - script: | call activate qiskit-aer-$(Build.BuildNumber) - conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy scipy + conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy scipy pywin32 conda install --yes --quiet --name qiskit-aer-$(Build. BuildNumber) python=%PYTHON_VERSION% jupyter displayName: Install Anaconda packages condition: eq(variables['python.version'], '3.8') From 7a34a554a5981d567112baeed4c794071e77f2f6 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 13 Nov 2019 09:57:57 -0500 Subject: [PATCH 05/20] Cap jupyter-sphinx version to non python 3.8 jobs The python 3.8 windows ci job can not install jupyter sphinx because of an issue with the pywin32 package. Pip is unable to find a compatible package for this and conda installing it doesn't satisfy the requirement for pip either. To workaround this issue this adds a version cap on jupyter-sphinx so we do not try to install it by default in every test environment. The package is only needed for building documentation and since it's unlikely that people will be installing docs on python 3.8 at this point and our ci jobs do not we use this to unblock python 3.8 jobs on windows temporarily. In the future though we'll have to remove this when people start using 3.8 as their default interpreter so that building docs with python 3.8 is feasible. --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index fe871be83e..222add4ec0 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -9,4 +9,4 @@ pycodestyle Sphinx>=1.8.3 sphinx-rtd-theme>=0.4.0 sphinx-tabs>=1.1.11 -jupyter-sphinx +jupyter-sphinx;python_version<'3.8' From 2a9cfe1e3d25b8cb1cb8f5ea73889d3123ddc77a Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 13 Nov 2019 11:17:49 -0500 Subject: [PATCH 06/20] Stop trying to rely on conda-forge and just try pip --- azure-pipelines.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5130c328b3..a8b8089379 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,13 +62,7 @@ jobs: conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% mkl conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% openblas displayName: Install Anaconda packages - condition: eq(variables['python.version'], '3.5') - - script: | - call activate qiskit-aer-$(Build.BuildNumber) - conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy scipy pywin32 - conda install --yes --quiet --name qiskit-aer-$(Build. BuildNumber) python=%PYTHON_VERSION% jupyter - displayName: Install Anaconda packages - condition: eq(variables['python.version'], '3.8') + condition: or(eq(variables['python.version'], '3.5'), eq(variables['python.version'], '3.8')) - bash: | set -e source activate qiskit-aer-$(Build.BuildNumber) From b90be6d0ac48a93e62f61233dce7db13667ecf66 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 13 Nov 2019 11:51:18 -0500 Subject: [PATCH 07/20] Add -v to pip install for debug --- azure-pipelines.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a8b8089379..3341db5d42 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -67,15 +67,15 @@ jobs: set -e source activate qiskit-aer-$(Build.BuildNumber) git clean -fdX - python -m pip install --disable-pip-version-check pip==18 - pip install cython - pip install git+https://github.com/Qiskit/qiskit-terra.git - pip install --ignore-installed -r requirements-dev.txt + python -m pip install -v --disable-pip-version-check pip==18 + pip install -v cython + pip install -v git+https://github.com/Qiskit/qiskit-terra.git + pip install -v --ignore-installed -r requirements-dev.txt python setup.py bdist_wheel -- -G "Visual Studio 15 2017 Win64" displayName: 'Install Dependencies and Build Aer' - bash: | set -e source activate qiskit-aer-$(Build.BuildNumber) - pip install dist/qiskit_aer*.whl + pip install -v dist/qiskit_aer*.whl python -m unittest discover -s test/terra -v displayName: 'Install Aer and Run Tests' From de76d0331a77c928e961491dc771de4a4bfc5307 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 13 Nov 2019 11:57:48 -0500 Subject: [PATCH 08/20] Don't upgrade pip and friends for python 3.8 windows job --- azure-pipelines.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3341db5d42..3c2c4ca898 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -66,8 +66,12 @@ jobs: - bash: | set -e source activate qiskit-aer-$(Build.BuildNumber) - git clean -fdX python -m pip install -v --disable-pip-version-check pip==18 + condition: ne(variables['python.version'], '3.8') + - bash: | + set -e + source activate qiskit-aer-$(Build.BuildNumber) + git clean -fdX pip install -v cython pip install -v git+https://github.com/Qiskit/qiskit-terra.git pip install -v --ignore-installed -r requirements-dev.txt From 41f9324f1d0b789994e16f9596cf9abaf48cfa55 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 14 Nov 2019 09:25:53 -0500 Subject: [PATCH 09/20] Add osx job to premerge ci too --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9574dd14f3..94f2334fa4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -130,7 +130,6 @@ jobs: - stage: test name: Python 3.8 Tests Linux - if: type = cron <<: *stage_osx python: 3.8 - PYTHON_VERSION=3.8.0 From 2fcc791ee694a928e9bad90a8e04769a7f4939d8 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 3 Dec 2019 04:41:53 -0500 Subject: [PATCH 10/20] Fix typos in travis config --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8b90785b48..bf55dc51d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -144,9 +144,10 @@ jobs: python: 3.5 - stage: test - name: Python 3.8 Tests Linux + name: Python 3.8 Tests OSX <<: *stage_osx python: 3.8 + env: - PYTHON_VERSION=3.8.0 # OSX, Python 3.7.2 (via pyenv) From 94d7d16f078c187810bccb0c13c40127eda73ed5 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 17 Jan 2020 00:05:05 -0500 Subject: [PATCH 11/20] Install osqp via conda --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 74905b7363..6a1329858f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -60,7 +60,7 @@ jobs: - script: | call activate qiskit-aer-$(Build.BuildNumber) conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% mkl - conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% openblas + conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% openblas osqp displayName: Install Anaconda packages condition: or(eq(variables['python.version'], '3.5'), eq(variables['python.version'], '3.8')) - bash: | From bec238f22af0575c8390b3ed7a14325e87963182 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 18 Jan 2020 00:54:53 -0500 Subject: [PATCH 12/20] Fix typo in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4adb1ccc37..291931db46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,7 +77,7 @@ Fixed Deprecated ---------- -- Python 3.5 support in qiskit-terra is deprecated. Support will be +- Python 3.5 support in qiskit-aer is deprecated. Support will be removed on the upstream python community's end of life date for the version, which is 09/13/2020. From a7cf7aec909eab38b4ef6ce43c52bf159e059795 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 18 Jan 2020 01:01:13 -0500 Subject: [PATCH 13/20] Switch to bash for conda install on 3.8 The script directive doesn't look like it's every command specified. The output for the python 3.8 anaconda install step doesn't seem to include the output for the second conda install command. This commit switches it to use bash so we can set trace mode to see if we're even running the command, or if something else is happening. --- azure-pipelines.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6a1329858f..8d49d119ca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -57,8 +57,10 @@ jobs: conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy displayName: Install Anaconda packages condition: and(ne(variables['python.version'], '3.5'), ne(variables['python.version'], '3.8')) - - script: | - call activate qiskit-aer-$(Build.BuildNumber) + - bash: | + set -x + set -e + source activate qiskit-aer-$(Build.BuildNumber) conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% mkl conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% openblas osqp displayName: Install Anaconda packages From 01a611e399aa48c6a7492daaf2a434c795f3e9bb Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 18 Jan 2020 01:10:51 -0500 Subject: [PATCH 14/20] Fix variable access --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8d49d119ca..151a57fa2e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -61,8 +61,8 @@ jobs: set -x set -e source activate qiskit-aer-$(Build.BuildNumber) - conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% mkl - conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% openblas osqp + conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) mkl + conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) openblas osqp displayName: Install Anaconda packages condition: or(eq(variables['python.version'], '3.5'), eq(variables['python.version'], '3.8')) - bash: | From 82b6cb05e87e7144297b042dde11a3f6a083c050 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 18 Jan 2020 01:27:45 -0500 Subject: [PATCH 15/20] Break out 3.8 requirement binary stage and switch to cvxpy osqp is only installed as a dependency for cvxpy. So instead of trying to install osqp and getting pip to see that the dep is already satisified when installing cvxpy it'll be easier to just install cvxpy via anaconda instead. --- azure-pipelines.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 151a57fa2e..c03352df36 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,9 +62,16 @@ jobs: set -e source activate qiskit-aer-$(Build.BuildNumber) conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) mkl - conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) openblas osqp + conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) openblas displayName: Install Anaconda packages condition: or(eq(variables['python.version'], '3.5'), eq(variables['python.version'], '3.8')) + - bash: | + set -x + set -e + source activate qiskit-aer-$(Build.BuildNumber) + conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) cvxpy + displayName: Install 3.8 packages from Anaconda + condition: eq(variables['python.version'], '3.8') - bash: | set -e source activate qiskit-aer-$(Build.BuildNumber) From eef2547fa3987b5897e3c3ec36867510e1be5c79 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Sat, 18 Jan 2020 01:37:17 -0500 Subject: [PATCH 16/20] Back to osqp cvxpy fails to install --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c03352df36..a623e1fa08 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -69,7 +69,7 @@ jobs: set -x set -e source activate qiskit-aer-$(Build.BuildNumber) - conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) cvxpy + conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) osqp displayName: Install 3.8 packages from Anaconda condition: eq(variables['python.version'], '3.8') - bash: | From 48a8e95ee50cb7bbf0c954f89b5d490e7d3233c1 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 20 Jan 2020 16:36:42 -0500 Subject: [PATCH 17/20] Tweak stages on azure pipelines slightly The azure pipelines stages had unecessary steps and duplicated logic. This commit cleans it up slightly and makes it easier to follow. --- azure-pipelines.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a623e1fa08..2f9428ced8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -54,9 +54,10 @@ jobs: displayName: Create Anaconda environment - script: | call activate qiskit-aer-$(Build.BuildNumber) + pip install -U pip virtualenv setuptools conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy displayName: Install Anaconda packages - condition: and(ne(variables['python.version'], '3.5'), ne(variables['python.version'], '3.8')) + condition: ne(variables['python.version'], '3.5') - bash: | set -x set -e @@ -66,25 +67,18 @@ jobs: displayName: Install Anaconda packages condition: or(eq(variables['python.version'], '3.5'), eq(variables['python.version'], '3.8')) - bash: | - set -x set -e source activate qiskit-aer-$(Build.BuildNumber) conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) osqp + pip install -U cvxpy displayName: Install 3.8 packages from Anaconda condition: eq(variables['python.version'], '3.8') - - bash: | - set -e - source activate qiskit-aer-$(Build.BuildNumber) - python -m pip install -v --disable-pip-version-check pip==18 - condition: ne(variables['python.version'], '3.8') - bash: | set -e source activate qiskit-aer-$(Build.BuildNumber) git clean -fdX - python -m pip install -U pip virtualenv setuptools - pip install cython - pip install git+https://github.com/Qiskit/qiskit-terra.git pip install --ignore-installed -r requirements-dev.txt + pip install git+https://github.com/Qiskit/qiskit-terra.git python setup.py bdist_wheel -- -G "Visual Studio 15 2017 Win64" displayName: 'Install Dependencies and Build Aer' - bash: | From 1b56c8056351bcb6296c1b2b4b3c936a9bf5602e Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 21 Jan 2020 03:17:46 -0500 Subject: [PATCH 18/20] Try splitting out dependency installs Oddly it looks like pip isn't finding osqp when installing the requirements outside in a separate stage. This commit attempts to fix the issue by moving the dependency installation into it's own stage. --- azure-pipelines.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2f9428ced8..b0bfef81d6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -70,17 +70,23 @@ jobs: set -e source activate qiskit-aer-$(Build.BuildNumber) conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) osqp - pip install -U cvxpy - displayName: Install 3.8 packages from Anaconda + pip install --ignore-installed -r requirements-dev.txt + pip install git+https://github.com/Qiskit/qiskit-terra.git + displayName: "Install dependencies py3.8" condition: eq(variables['python.version'], '3.8') - bash: | set -e source activate qiskit-aer-$(Build.BuildNumber) - git clean -fdX pip install --ignore-installed -r requirements-dev.txt pip install git+https://github.com/Qiskit/qiskit-terra.git + displayName: "Install dependencies" + condition: ne(variables['python.version'], '3.8') + - bash: | + set -e + source activate qiskit-aer-$(Build.BuildNumber) + git clean -fdX python setup.py bdist_wheel -- -G "Visual Studio 15 2017 Win64" - displayName: 'Install Dependencies and Build Aer' + displayName: 'Build Aer' - bash: | set -e source activate qiskit-aer-$(Build.BuildNumber) From 0222e9a5c8b36c3d4404c0a38f753340b99469d6 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 21 Jan 2020 03:30:17 -0500 Subject: [PATCH 19/20] Install more python deps via conda --- azure-pipelines.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b0bfef81d6..e33c563d37 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -52,10 +52,12 @@ jobs: displayName: Add conda to PATH - script: conda create --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% displayName: Create Anaconda environment - - script: | - call activate qiskit-aer-$(Build.BuildNumber) - pip install -U pip virtualenv setuptools - conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy + - bash: | + set -x + set -e + source activate qiskit-aer-$(Build.BuildNumber) + conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy pip virtualenv + conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% setuptools displayName: Install Anaconda packages condition: ne(variables['python.version'], '3.5') - bash: | @@ -70,14 +72,14 @@ jobs: set -e source activate qiskit-aer-$(Build.BuildNumber) conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=$(python.version) osqp - pip install --ignore-installed -r requirements-dev.txt + pip install -r requirements-dev.txt pip install git+https://github.com/Qiskit/qiskit-terra.git displayName: "Install dependencies py3.8" condition: eq(variables['python.version'], '3.8') - bash: | set -e source activate qiskit-aer-$(Build.BuildNumber) - pip install --ignore-installed -r requirements-dev.txt + pip install -r requirements-dev.txt pip install git+https://github.com/Qiskit/qiskit-terra.git displayName: "Install dependencies" condition: ne(variables['python.version'], '3.8') From 492ed6991591ea238eaf7397c0b2158b4e395d2f Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 21 Jan 2020 03:33:33 -0500 Subject: [PATCH 20/20] Fix bash variable access again --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e33c563d37..b69805bce7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -56,8 +56,8 @@ jobs: set -x set -e source activate qiskit-aer-$(Build.BuildNumber) - conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% numpy pip virtualenv - conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python=%PYTHON_VERSION% setuptools + conda install --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python==$(python.version) numpy pip virtualenv + conda install -c conda-forge --yes --quiet --name qiskit-aer-$(Build.BuildNumber) python==$(python.version) setuptools displayName: Install Anaconda packages condition: ne(variables['python.version'], '3.5') - bash: |