Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Error] pip install torchlars #14

Open
Topology1225 opened this issue Dec 10, 2020 · 3 comments
Open

[Error] pip install torchlars #14

Topology1225 opened this issue Dec 10, 2020 · 3 comments

Comments

@Topology1225
Copy link

Topology1225 commented Dec 10, 2020

When I tried to install torchlars via pip install torchlars, I faced the next errors.

Can anyone solve this?

Installing collected packages: torchlars
    Running setup.py install for torchlars ... error
    ERROR: Command errored out with exit status 1:
     command: /home/satoharu/.pyenv/versions/3.8.6/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-brudjor_/torchlars/setup.py'"'"'; __file__='"'"'/tmp/pip-install-brudjor_/torchlars/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-pzwa2q8c/install-record.txt --single-version-externally-managed --compile --install-headers /home/satoharu/.pyenv/versions/3.8.6/include/python3.8/torchlars
         cwd: /tmp/pip-install-brudjor_/torchlars/
    Complete output (35 lines):
    WARNING: The wheel package is not available.
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/torchlars
    copying torchlars/__init__.py -> build/lib.linux-x86_64-3.8/torchlars
    copying torchlars/__version__.py -> build/lib.linux-x86_64-3.8/torchlars
    copying torchlars/lars.py -> build/lib.linux-x86_64-3.8/torchlars
    running build_ext
    /home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/utils/cpp_extension.py:339: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
      warnings.warn(msg.format('we could not find ninja.'))
    /home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/utils/cpp_extension.py:281: UserWarning:
    
                                   !! WARNING !!
    
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch!
    Please use a compiler that is ABI-compatible with GCC 5.0 and above.
    See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.
    
    See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
    for instructions on how to install GCC 5 or higher.
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    
                                  !! WARNING !!
    
      warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
    building 'torchlars._adaptive_lr' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/torchlars
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/include -I/home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/include/TH -I/home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/satoharu/.pyenv/versions/3.8.6/include/python3.8 -c torchlars/adaptive_lr.cc -o build/temp.linux-x86_64-3.8/torchlars/adaptive_lr.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_adaptive_lr -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    gcc: error: unrecognized command line option ‘-std=c++14’
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/satoharu/.pyenv/versions/3.8.6/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-brudjor_/torchlars/setup.py'"'"'; __file__='"'"'/tmp/pip-install-brudjor_/torchlars/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-pzwa2q8c/install-record.txt --single-version-externally-managed --compile --install-headers /home/satoharu/.pyenv/versions/3.8.6/include/python3.8/torchlars Check the logs for full command output.
@aki916
Copy link

aki916 commented Dec 10, 2020

I encountered the same error.
Currently, my torch version is 1.7.0.

@lorafei
Copy link

lorafei commented Feb 27, 2021

When I tried to install torchlars via pip install torchlars, I faced the next errors.

Can anyone solve this?

Installing collected packages: torchlars
    Running setup.py install for torchlars ... error
    ERROR: Command errored out with exit status 1:
     command: /home/satoharu/.pyenv/versions/3.8.6/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-brudjor_/torchlars/setup.py'"'"'; __file__='"'"'/tmp/pip-install-brudjor_/torchlars/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-pzwa2q8c/install-record.txt --single-version-externally-managed --compile --install-headers /home/satoharu/.pyenv/versions/3.8.6/include/python3.8/torchlars
         cwd: /tmp/pip-install-brudjor_/torchlars/
    Complete output (35 lines):
    WARNING: The wheel package is not available.
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/torchlars
    copying torchlars/__init__.py -> build/lib.linux-x86_64-3.8/torchlars
    copying torchlars/__version__.py -> build/lib.linux-x86_64-3.8/torchlars
    copying torchlars/lars.py -> build/lib.linux-x86_64-3.8/torchlars
    running build_ext
    /home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/utils/cpp_extension.py:339: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
      warnings.warn(msg.format('we could not find ninja.'))
    /home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/utils/cpp_extension.py:281: UserWarning:
    
                                   !! WARNING !!
    
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    Your compiler (g++ 4.8.5) may be ABI-incompatible with PyTorch!
    Please use a compiler that is ABI-compatible with GCC 5.0 and above.
    See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html.
    
    See https://gist.github.com/goldsborough/d466f43e8ffc948ff92de7486c5216d6
    for instructions on how to install GCC 5 or higher.
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    
                                  !! WARNING !!
    
      warnings.warn(ABI_INCOMPATIBILITY_WARNING.format(compiler))
    building 'torchlars._adaptive_lr' extension
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/torchlars
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/include -I/home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/include/TH -I/home/satoharu/.pyenv/versions/3.8.6/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/satoharu/.pyenv/versions/3.8.6/include/python3.8 -c torchlars/adaptive_lr.cc -o build/temp.linux-x86_64-3.8/torchlars/adaptive_lr.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_adaptive_lr -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
    gcc: error: unrecognized command line option ‘-std=c++14’
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/satoharu/.pyenv/versions/3.8.6/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-brudjor_/torchlars/setup.py'"'"'; __file__='"'"'/tmp/pip-install-brudjor_/torchlars/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-pzwa2q8c/install-record.txt --single-version-externally-managed --compile --install-headers /home/satoharu/.pyenv/versions/3.8.6/include/python3.8/torchlars Check the logs for full command output.

I encountered the same error. Did you solve it now?

@LvXueshuai
Copy link

我遇到了同样的错误。 目前,我的手电筒版本是 1.7.0。

请问你们解决问题了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants