Skip to content

Commit ca7e7d4

Browse files
committed
fix numpy dll missing issue with anaconda python on windows
1 parent 4e7b167 commit ca7e7d4

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

ci_build/azure_pipelines/templates/job_generator.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@ 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'

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)