Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

numpy+mkl installing wrong version #53

Open
mohmesflir opened this issue Jan 12, 2021 · 4 comments
Open

numpy+mkl installing wrong version #53

mohmesflir opened this issue Jan 12, 2021 · 4 comments

Comments

@mohmesflir
Copy link

mohmesflir commented Jan 12, 2021

Gohlke has started adding vanilla wheels for numpy and trying to install using "pipwin install numpy" is choosing the vanilla wheel instead of the mkl wheel. Is there a way to request the mkl version without specifying a specific version number?

@lepisma
Copy link
Owner

lepisma commented Feb 28, 2021

Hi, yes the local identifer (mkl, vanilla) in version string is handled automatically if you specify versions like this

pipwin download numpy=="1.19.5+vanilla"

Filter only based on version string is probably not supported by the default specifier parser. Check this PEP for more details.

image

@mohmesflir
Copy link
Author

pipwin download numpy=="1.19.5+vanilla" is not working as I get a

ValueError: Could not satisfy requirement numpy==1.19.5+vanilla

But this is a minor detail. At least my goal in using pipwin is to not have to manually download the proper wheel file and instead have pipwin install the latest version. However, now that Gohlke has started providing both mkl and vanilla versions of numpy, running pipwin install numpy may end up installing either the mkl or the vanilla version. At least in my testing, I cannot filter for only the mkl versions - i.e. pipwin install numpy=="mkl". Is there a way to filter a package for a specific variant without specifying the version number?

Here is the error chain that I get when running the following:
pipwin install numpy=="1.19.5+mkl"

Package numpy==1.19.5+mkl found in cache
Traceback (most recent call last):
File "c:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\program files\python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Program Files\Python39\Scripts\pipwin.exe_main
.py", line 7, in
File "c:\program files\python39\lib\site-packages\pipwin\command.py", line 103, in main
cache.install(package)
File "c:\program files\python39\lib\site-packages\pipwin\pipwin.py", line 300, in install
wheel_file = self.download(requirement)
File "c:\program files\python39\lib\site-packages\pipwin\pipwin.py", line 294, in download
return self._download(requirement, dest)
File "c:\program files\python39\lib\site-packages\pipwin\pipwin.py", line 270, in _download
url = self._get_url(requirement)
File "c:\program files\python39\lib\site-packages\pipwin\pipwin.py", line 259, in _get_url
raise ValueError("Could not satisfy requirement %s" % (str(requirement)))
ValueError: Could not satisfy requirement numpy==1.19.5+mkl

I am using pipwin v0.5.1

@samapriya
Copy link
Contributor

You are running python 3.9 and there isn't a vanilla packaging available for NumPy for Python 3.9, only up to 3.8 here https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy

hence the could not satisfy requirement

@SmartManoj
Copy link
Contributor

pipwin download numpy=="1.19.5+vanilla"

It would be nice if it is pipwin install numpy=="*mkl"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants