我試圖讓pip根據用戶的平臺從不同來源安裝numpy。我試圖通過使用「platform_system」環境標記來實現。有條件地使用pip安裝wheel文件
# requirements.txt
# installing from a local wheel file
/python35/wheels_repo/numpy-1.12.0.whl;platform_system == "Linux"
# installing from PyPi
numpy==1.12.0;platform_system == "Windows"
它正常工作,當我在Linux上,但是當我在該文件的Windows PIP搜索 - 這甚至沒有在Windows中適當的文件路徑 - 即使它是由「platform_system保護」。
Requirement '/python35/wheels_repo/numpy-1.12.0.whl' looks like a filename, but the file does not exist
然後安裝停止。
有沒有辦法讓pip找不到這個文件,或者至少是恢復安裝,如果找不到文件?