Skip to content

Commit 0fbb359

Browse files
authored
Merge pull request #317 from nbcsm/numpy
fix numpy dll missing issue with anaconda python on windows
2 parents 4e7b167 + 9fafd9f commit 0fbb359

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

ci_build/azure_pipelines/templates/job_generator.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,14 @@ jobs:
7070
# versionSpec: '$(CI_PYTHON_VERSION)'
7171
# architecture: 'x64'
7272

73+
# TODO: Conda Environment task is deprecating, move to raw python after issue above is fixed.
74+
# https://github.com/Microsoft/azure-pipelines-tasks/pull/9573
7375
- task: CondaEnvironment@1
7476
inputs:
7577
createCustomEnvironment: 'true'
7678
environmentName: 'tf2onnx'
7779
packageSpecs: 'python=$(CI_PYTHON_VERSION)'
80+
updateConda: 'false'
7881

7982
- ${{ if eq(parameters.run_setup, 'True') }}:
8083
- template: 'setup.yml'

ci_build/azure_pipelines/templates/setup.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,17 @@ steps:
88
python setup.py install
99
pip freeze --all
1010
displayName: 'Setup Environment'
11+
12+
# TODO: remove later
13+
# Anaconda python 3.6.8 h9f7ef89_1 changed dll lookup logic, numpy failes to load dll on Windows
14+
# https://github.com/numpy/numpy/issues/12957
15+
# https://github.com/ContinuumIO/anaconda-issues/issues/10629
16+
# Add numpy lib path manually here
17+
- bash: |
18+
site_dir=$(python -c "import site; print(site.getsitepackages()[1])")
19+
echo "##vso[task.prependpath]$site_dir\numpy\.libs"
20+
displayName: 'Fix numpy path'
21+
condition: and(succeeded(), in(variables['Agent.OS'], 'Windows_NT'))
22+
23+
- bash: env
24+
displayName: 'Display Environment Variables'

0 commit comments

Comments
 (0)