pipenv
pipenv copied to clipboard
intel-numpy gets overriden by numpy
I wanted to use intel-numpy with other packages however installation of any package which requires numpy overrides numpy installed by intel-numpy
Reproducer
$ pipenv install intel-numpy
$ pipenv run pip list
Package Version
------------ -------
icc-rt 2019.0
intel-numpy 1.15.1
intel-openmp 2019.0
mkl 2019.0
mkl-fft 1.0.6
mkl-random 1.0.1.1
numpy 1.15.1
pip 18.1
setuptools 40.6.3
tbb 2019.0
tbb4py 2019.0
wheel 0.32.3
$ pipenv install tables
$ pipenv run pip list
Package Version
------------ -------
icc-rt 2019.0
intel-openmp 2019.0
mkl 2019.0
mkl-fft 1.0.6
mkl-random 1.0.1.1
numexpr 2.6.9
numpy 1.16.0
pip 18.1
setuptools 40.6.3
six 1.12.0
tables 3.4.4
tbb 2019.0
tbb4py 2019.0
wheel 0.32.3
See that intel-numpy disappeared and numpy got upgraded
It looks like pipenv does not take into account that numpy may be present in the environment (that it was installed by intel-numpy)
verbose output:
$ pipenv install tables --verbose
Installing tables...
⠋ Installing...Installing u'tables'
$ ['/home/pgrunt/.local/share/virtualenvs/lll-HYhhZEFA/bin/pip', 'install', '--verbose', '--upgrade', 'tables', '-i', u'https://pypi.org/simple']
Adding tables to Pipfile's [packages]...
✔ Installation Succeeded
Pipfile.lock (6bf884) out of date, updating to (977289)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
✔ Success!
Using pip: -i https://pypi.org/simple
Using pip: -i https://pypi.org/simple
Using pip: -i https://pypi.org/simple
ROUND 1
Current constraints:
intel-numpy
tables
Finding the best candidates:
found candidate intel-numpy==1.15.1 (constraint was <any>)
found candidate tables==3.4.4 (constraint was <any>)
Finding secondary dependencies:
intel-numpy==1.15.1 requires icc-rt, mkl, mkl-fft, mkl-random, tbb4py
tables==3.4.4 requires numexpr>=2.5.2, numpy>=1.8.0, six>=1.9.0
New dependencies found in this round:
adding [u'icc-rt', '', '[]']
adding [u'mkl', '', '[]']
adding [u'mkl-fft', '', '[]']
adding [u'mkl-random', '', '[]']
adding [u'numexpr', '>=2.5.2', '[]']
adding [u'numpy', '>=1.8.0', '[]']
adding [u'six', '>=1.9.0', '[]']
adding [u'tbb4py', '', '[]']
Removed dependencies in this round:
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable
ROUND 2
Current constraints:
icc-rt
intel-numpy
mkl
mkl-fft
mkl-random
numexpr>=2.5.2
numpy>=1.8.0
six>=1.9.0
tables
tbb4py
Finding the best candidates:
found candidate icc-rt==2019.0 (constraint was <any>)
found candidate intel-numpy==1.15.1 (constraint was <any>)
found candidate mkl==2019.0 (constraint was <any>)
found candidate mkl-fft==1.0.6 (constraint was <any>)
found candidate mkl-random==1.0.1.1 (constraint was <any>)
found candidate numexpr==2.6.9 (constraint was >=2.5.2)
found candidate numpy==1.16.0 (constraint was >=1.8.0)
found candidate six==1.12.0 (constraint was >=1.9.0)
found candidate tables==3.4.4 (constraint was <any>)
found candidate tbb4py==2019.0 (constraint was <any>)
Finding secondary dependencies:
mkl-random==1.0.1.1 requires intel-numpy
icc-rt==2019.0 requires intel-openmp
tables==3.4.4 requires numexpr>=2.5.2, numpy>=1.8.0, six>=1.9.0
mkl-fft==1.0.6 requires intel-numpy
six==1.12.0 requires -
numpy==1.16.0 requires -
numexpr==2.6.9 requires numpy>=1.7
tbb4py==2019.0 requires tbb==2019.*
mkl==2019.0 requires intel-openmp
intel-numpy==1.15.1 requires icc-rt, mkl, mkl-fft, mkl-random, tbb4py
New dependencies found in this round:
adding [u'intel-numpy', '', '[]']
adding [u'intel-openmp', '', '[]']
adding [u'numpy', '>=1.7,>=1.8.0', '[]']
adding [u'tbb', '==2019.*', '[]']
Removed dependencies in this round:
removing [u'numpy', '>=1.8.0', '[]']
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 2: not stable
ROUND 3
Current constraints:
icc-rt
intel-numpy
intel-openmp
mkl
mkl-fft
mkl-random
numexpr>=2.5.2
numpy>=1.7,>=1.8.0
six>=1.9.0
tables
tbb==2019.*
tbb4py
Finding the best candidates:
found candidate icc-rt==2019.0 (constraint was <any>)
found candidate intel-numpy==1.15.1 (constraint was <any>)
found candidate intel-openmp==2019.0 (constraint was <any>)
found candidate mkl==2019.0 (constraint was <any>)
found candidate mkl-fft==1.0.6 (constraint was <any>)
found candidate mkl-random==1.0.1.1 (constraint was <any>)
found candidate numexpr==2.6.9 (constraint was >=2.5.2)
found candidate numpy==1.16.0 (constraint was >=1.7,>=1.8.0)
found candidate six==1.12.0 (constraint was >=1.9.0)
found candidate tables==3.4.4 (constraint was <any>)
found candidate tbb==2019.0 (constraint was ==2019.*)
found candidate tbb4py==2019.0 (constraint was <any>)
Finding secondary dependencies:
tables==3.4.4 requires numexpr>=2.5.2, numpy>=1.8.0, six>=1.9.0
tbb4py==2019.0 requires tbb==2019.*
numexpr==2.6.9 requires numpy>=1.7
tbb==2019.0 requires -
icc-rt==2019.0 requires intel-openmp
mkl==2019.0 requires intel-openmp
mkl-fft==1.0.6 requires intel-numpy
mkl-random==1.0.1.1 requires intel-numpy
numpy==1.16.0 requires -
intel-openmp==2019.0 requires -
intel-numpy==1.15.1 requires icc-rt, mkl, mkl-fft, mkl-random, tbb4py
six==1.12.0 requires -
------------------------------------------------------------
Result of round 3: stable, done
Hey, I came across the same problem.
What fixed it for me is adding numpy = "==1.15.1" into the Pipfile.
The mkl accelerated version will be still used when you import it in your project.
@xerus or @boing102 can this issue be rechecked on latest pipenv?
Yes, I can still reproduce the issue
pipenv install intel-numpy
pipenv install tables
pipenv run pip list | grep numpy
intel-numpy 1.21.4
numpy 1.23.4
@xerus Perhaps this is able to be worked around with package based category installations in the latest pipenv releases. Please see this ticket for additional details: https://github.com/pypa/pipenv/issues/5455
I'd say perhaps a category that installs intel-numpy following the default which overrides it because tables requires the regular numpy?