在我的項(xiàng)目中,我需要同時(shí)支持 Linux 和 Windows,因此我遵循了這些準(zhǔn)則并將這些行添加到我的pyproject.toml文件中:[tool.poetry.dependencies]torch = [ {url="https://download.pytorch.org/whl/cu101/torch-1.4.0-cp36-cp36m-win_amd64.whl", markers="sys_platform=='win32'"}, {url="https://download.pytorch.org/whl/cu101/torch-1.4.0-cp36-cp36m-linux_x86_64.whl", markers="sys_platform!='win32'"}](另外我嘗試過os_name=='nt')但是當(dāng)我嘗試運(yùn)行時(shí)poetry update,我收到以下錯(cuò)誤:[RuntimeError]The Poetry configuration is invalid: - [dependencies.torch] [{'url': 'https://download.pytorch.org/whl/cu101/torch-1.4.0-cp36-cp36m-win_amd64.whl', 'markers': "sys_platform=='win32'"}, {'url': 'https://download.pytorch.org/whl/cu101/torch-1.4.0-cp36-cp36m-linux_x86_64.whl', 'markers': "sys_platform!='win32'"}] is not valid under any of the given schemas使用 Poetry 在不同平臺(tái)上安裝同一軟件包的不同版本的正確方法是什么?
添加回答
舉報(bào)
0/150
提交
取消