pytorch-wordemb icon indicating copy to clipboard operation
pytorch-wordemb copied to clipboard

Installation errors related to backend GCC version

Open atsukoba opened this issue 5 years ago • 1 comments

On installation with gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11), I faced the error below when I run pip install torchwordemb inside of the docker container of the image nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04

    src/loadwordemb.cpp: In function ‘VocabAndTensor load_word2vec_bin(const char*)’:
    src/loadwordemb.cpp:139:52: warning: narrowing conversion of ‘n_word’ from ‘size_t {aka long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]
             dest.resize_(torch::IntArrayRef{n_word, dim});
                                                        ^
    src/loadwordemb.cpp:139:52: warning: narrowing conversion of ‘n_word’ from ‘size_t {aka long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]
    src/loadwordemb.cpp:139:52: warning: narrowing conversion of ‘dim’ from ‘size_t {aka long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]
    src/loadwordemb.cpp:139:52: warning: narrowing conversion of ‘dim’ from ‘size_t {aka long unsigned int}’ to ‘long int’ inside { } [-Wnarrowing]
    src/loadwordemb.cpp:157:24: error: converting to ‘VocabAndTensor {aka std::tuple<pybind11::dict, at::Tensor>}’ from initializer list would use explicit constructor ‘constexpr std::tuple<_T1, _T2>::tuple(_U1&&, _U2&&) [with _U1 = pybind11::dict&; _U2 = at::Tensor&; <template-parameter-2-3> = void; _T1 = pybind11::dict; _T2 = at::Tensor]’
         return {vocab, dest};
                            ^
    error: command 'gcc' failed with exit status 1
    ----------------------------------------

but I succeeded to install with gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1).

Is this error due to the conflict of gcc versions?

atsukoba avatar Feb 18 '20 11:02 atsukoba

I didn't go to this step and I would like to know how you did it. I always reported an error: command 'C: Program Files Microsoft Visual Studio 2022 Community VC Tools MSVC 14.35.32215 bin HostX86 x64 cl. exe' failed with exit status 2, possibly because I don't know much about Python setup.py install. Can you give me some help?

Forcxy avatar Oct 21 '23 08:10 Forcxy