[英]How to pip install *.whl on Windows (using a wildcard)
For some reason, I cannot pip install %CD%\\*.whl
as I will then get: 出于某种原因,我无法点击
pip install %CD%\\*.whl
因为我会得到:
Requirement 'C:\\Users\fredrik\\Downloads\\*.whl' looks like a filename, but the file does not exist
`*.whl is not a valid wheel filename.
On macOS (and I believe on Linux), I can do this without issues: 在macOS上(我相信Linux),我可以毫无问题地做到这一点:
pip install *.whl
Processing ./certifi-2017.11.5-py2.py3-none-any.whl
Processing ./chardet-3.0.4-py2.py3-none-any.whl
Processing ./idna-2.6-py2.py3-none-any.whl
Processing ./requests-2.18.4-py2.py3-none-any.whl
Processing ./urllib3-1.22-py2.py3-none-any.whl
...
pip install *.whl
) work on Windows? pip install *.whl
)在Windows上运行? If you know the package name eg foo
You can use this: 如果您知道包名称,例如
foo
您可以使用:
python -m pip install --find-links=C:\Users\fredrik\Downloads foo
this will find any foo
package eg foo-XYZ-cp37-cp37m-win_amd64.whl
etc... 这将找到任何
foo
包,例如foo-XYZ-cp37-cp37m-win_amd64.whl
等...
If you don't know the package name then you can try: 如果您不知道包名,那么您可以尝试:
FOR %%i in (C:\Users\fredrik\Downloads\*.whl) DO python -m pip install %i
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.