IBM / transition-amr-parser

SoTA Abstract Meaning Representation (AMR) parsing with word-node alignments in Pytorch. Includes checkpoints and other tools such as statistical significance Smatch.
Apache License 2.0
231 stars 46 forks source link

Question about setting the environment #43

Closed antonlabate closed 1 year ago

antonlabate commented 1 year ago

Hi!

I ran the command pip install --editable ., however as a response I got some problems, particularly related to the torch version (below the full message that I got). Is there any suggestion on how I might solve this issue?

Building wheels for collected packages: torch-scatter Building wheel for torch-scatter (setup.py) ... error ERROR: Command errored out with exit status 1: command: /home/alabate/transition-amr-parser/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-zovxf2mm/torch-scatter/setup.py'"'"'; file='"'"'/tmp/pip-install-zovxf2mm/torch-scatter/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-9szx92a5 cwd: /tmp/pip-install-zovxf2mm/torch-scatter/ Complete output (27 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.8 creating build/lib.linux-x86_64-3.8/torch_scatter copying torch_scatter/init.py -> build/lib.linux-x86_64-3.8/torch_scatter copying torch_scatter/segment_csr.py -> build/lib.linux-x86_64-3.8/torch_scatter copying torch_scatter/segment_coo.py -> build/lib.linux-x86_64-3.8/torch_scatter copying torch_scatter/scatter.py -> build/lib.linux-x86_64-3.8/torch_scatter copying torch_scatter/placeholder.py -> build/lib.linux-x86_64-3.8/torch_scatter copying torch_scatter/utils.py -> build/lib.linux-x86_64-3.8/torch_scatter creating build/lib.linux-x86_64-3.8/torch_scatter/composite copying torch_scatter/composite/init.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite copying torch_scatter/composite/logsumexp.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite copying torch_scatter/composite/std.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite copying torch_scatter/composite/softmax.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite running build_ext building 'torch_scatter._version_cpu' extension creating build/temp.linux-x86_64-3.8 creating build/temp.linux-x86_64-3.8/csrc x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Icsrc -I/home/alabate/transition-amr-parser/venv/lib/python3.8/site-packages/torch/include -I/home/alabate/transition-amr-parser/venv/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/alabate/transition-amr-parser/venv/lib/python3.8/site-packages/torch/include/TH -I/home/alabate/transition-amr-parser/venv/lib/python3.8/site-packages/torch/include/THC -I/home/alabate/transition-amr-parser/venv/include -I/usr/include/python3.8 -c csrc/version.cpp -o build/temp.linux-x86_64-3.8/csrc/version.o -O2 -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="_cxxabi1011" -DTORCH_EXTENSION_NAME=_version_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 csrc/version.cpp:1:10: fatal error: Python.h: File or directory nonexistent 1 | #include | ^~~~~~ compilation terminated. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

ERROR: Failed building wheel for torch-scatter Running setup.py clean for torch-scatter Failed to build torch-scatter ERROR: torchvision 0.14.1 has requirement torch==1.13.1, but you'll have torch 1.10.1 which is incompatible.

Thanks! Anton

ramon-astudillo commented 1 year ago

ERROR: torchvision 0.14.1 has requirement torch==1.13.1, but you'll have torch 1.10.1 which is incompatible.

this seems unrelated to this repository, the torch vision version you are using is not compatible.