bruel-gabrielsson/TopologyLayer

cannot install the package

travis0925 opened this issue · 1 comments

Running code: pip install --verbose git+https://github.com/bruel-gabrielsson/TopologyLayer.git

get the error:
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1238, in _write_ninja_file_and_compile_objects
error_prefix='Error compiling objects for extension')
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1538, in _run_ninja_build
raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
Running setup.py install for topologylayer ... error
ERROR: Command errored out with exit status 1: /home/zhangli/anaconda3/envs/travis_dev2/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-exac9ln8/setup.py'"'"'; file='"'"'/tmp/pip-req-build-exac9ln8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-h9ux0qxa/install-record.txt --single-version-externally-managed --compile --install-headers /home/zhangli/anaconda3/envs/travis_dev2/include/python3.6m/topologylayer Check the logs for full command output.
Exception information:
Traceback (most recent call last):
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 854, in install
req_description=str(self.req),
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/operations/install/legacy.py", line 86, in install
raise LegacyInstallFailure
pip._internal.operations.install.legacy.LegacyInstallFailure

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 210, in _main
status = self.run(options, args)
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
return func(self, options, args)
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 401, in run
pycompile=options.compile,
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/req/init.py", line 90, in install_given_reqs
pycompile=pycompile,
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 858, in install
six.reraise(*exc.parent)
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_vendor/six.py", line 703, in reraise
raise value
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/operations/install/legacy.py", line 76, in install
cwd=unpacked_source_directory,
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/utils/subprocess.py", line 275, in runner
spinner=spinner,
File "/home/zhangli/anaconda3/envs/travis_dev2/lib/python3.6/site-packages/pip/_internal/utils/subprocess.py", line 240, in call_subprocess
raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /home/zhangli/anaconda3/envs/travis_dev2/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-exac9ln8/setup.py'"'"'; file='"'"'/tmp/pip-req-build-exac9ln8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-h9ux0qxa/install-record.txt --single-version-externally-managed --compile --install-headers /home/zhangli/anaconda3/envs/travis_dev2/include/python3.6m/topologylayer Check the logs for full command output.
Removed build tracker: '/tmp/pip-req-tracker-hw6acp_h'

python 3.6
pytorch 1.7.0

envs:
_libgcc_mutex 0.1 main defaults
absl-py 0.11.0
blas 1.0
bleach 1.5.0
ca-certificates 2020.10.14
certifi 2020.11.8
cudatoolkit 10.1.243
cycler 0.10.0
dataclasses 0.7
dbus 1.13.18
decorator 4.1.2
distro 1.5.0
dntk 0.3.0
entrypoints 0.2.3
expat 2.2.10
fontconfig 2.13.0
freetype 2.10.4
glib 2.66.1
grpcio 1.12.1
gst-plugins-base 1.14.0
gstreamer 1.14.0
html5lib 0.9999999
icu 58.2
intel-openmp 2020.2
ipykernel 4.6.1
ipython 6.1.0
ipython_genutils 0.2.0
ipywidgets 6.0.0
jbig 2.1
jedi 0.10.2
jinja2 2.9.6
joblib 0.11
jpeg 9b
jsonschema 2.6.0
jupyter 1.0.0
jupyter_client 5.1.0
jupyter_console 5.2.0
jupyter_core 4.3.0
kiwisolver 1.3.0
lcms2 2.11
ld_impl_linux-64 2.33.1
libedit 3.1.20191231
libffi 3.3
libgcc 7.2.0
libgcc-ng 9.1.0
libgfortran-ng 7.3.0
libiconv 1.14
libpng 1.6.37
libprotobuf 3.13.0.1
libsodium 1.0.10
libstdcxx-ng 9.1.0
libtiff 4.1.0
libuuid 1.0.3
libuv 1.40.0
libxcb 1.14
libxml2 2.9.10
lz4-c 1.9.2
markdown 2.6.9
markupsafe 1.0
matplotlib 3.3.2
matplotlib-base 3.3.2
mistune 0.7.4
mkl 2020.2
mkl-service 2.3.0
mkl_fft 1.2.0
mkl_random 1.1.1
nbconvert 5.2.1
nbformat 4.4.0
ncurses 6.2
ninja 1.7.2
notebook 5.0.0
numpy 1.19.2
numpy-base 1.19.2
olefile 0.44
openssl 1.1.1h
packaging 20.7
pandas 0.20.3
pandocfilters 1.4.2
path.py 10.3.1
pcre 8.44
pexpect 4.2.1
pickleshare 0.7.4
pillow 8.0.1
pip 20.3
prompt_toolkit 1.0.15
protobuf 3.13.0.1
ptyprocess 0.5.2
pygments 2.2.0
pyparsing 2.2.0
pyqt 5.9.2
pyradiomics 3.0.1
python 3.6.12
python-dateutil 2.6.1
pytorch 1.7.0
pytz 2017.2
pyzmq 16.0.2
qt 5.9.7
qtconsole 4.3.1
readline 8.0
scikit-build 0.11.1
scikit-learn 0.23.2
scipy 1.5.2
setuptools 36.4.0
simplegeneric 0.8.1
sip 4.19.8
six 1.10.0
sqlite 3.33.0
tensorboard 1.14.0
terminado 0.6
testpath 0.3.1
threadpoolctl 2.1.0
tk 8.6.10
torchaudio 0.7.0
torchvision 0.8.1
tornado 4.5.2
traitlets 4.3.2
typing_extensions 3.7.4.3
wcwidth 0.1.7
werkzeug 0.12.2
wheel 0.29.0
widgetsnbextension 3.0.2
xz 5.2.5
zeromq 4.1.5
zlib 1.2.11
zstd 1.4.5

Problem sovled by modifying '-std=c++11' to '-std=c++14' in setup.py
Thank you for your help. @siavashdarkvision