Skip to content

Instantly share code, notes, and snippets.

@bobthemighty
Created March 20, 2023 13:49
Show Gist options
  • Save bobthemighty/2298ff9c7eb6bd295a43fda7565dfb75 to your computer and use it in GitHub Desktop.
Save bobthemighty/2298ff9c7eb6bd295a43fda7565dfb75 to your computer and use it in GitHub Desktop.
Failure to parse torch requirement
[GLOBAL]
pants_version = "2.15.0"
backend_packages = [
"pants.backend.python"
]
[source]
root_patterns = ["/"]
[python]
interpreter_constraints = [">=3.9,<3.10"]
enable_resolves = true
resolves = { python-default = "lockfiles/python-default.lock" }
[tool.poetry]
name = "torchbug"
version = "0.1.0"
description = ""
authors = ["Bob Gregory <bob@codefiend.co.uk>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.9"
torch = [
{markers = "platform_machine == 'arm64' and sys_platform == 'darwin'", url = "https://download.pytorch.org/whl/cpu/torch-1.9.1-cp39-none-macosx_11_0_arm64.whl"},
{markers = "platform_machine == 'x86_64' and sys_platform == 'darwin'", url = "https://download.pytorch.org/whl/cpu/torch-1.9.1-cp39-none-macosx_10_9_x86_64.whl"},
{markers = "platform_machine == 'x86_64' and sys_platform == 'linux'", url = "https://download.pytorch.org/whl/cpu/torch-1.9.1%2Bcpu-cp39-cp39-linux_x86_64.whl"}
]
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
$ pants tailor ::
13:42:22.60 [WARN] An error occurred when validating `pyproject.toml`: Invalid requirement 'torch @ https://download.pytorch.org/whl/cpu/torch-1.9.1-cp39-none-macosx_11_0_arm64.whl;(platform_machine == 'arm64' and sys_platform == 'darwin')': Parse error at ""== 'arm6"": Expected string_end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment