Получение ошибки компилятора при попытке установить модуль pip - PullRequest
0 голосов
/ 20 января 2020

Я пытаюсь установить модуль eif, используя pip install eif, но получаю следующее сообщение об ошибке:

 Building wheel for eif (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\Manesh Halai\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MANESH~1\\AppData\\Local\\Temp\\pip-install-zhaj3f4q\\eif\\setup.py'"'"'; __file__='"'"'C:\\Users\\MANESH~1\\AppData\\Local\\Temp\\pip-install-zhaj3f4q\\eif\\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 'C:\Users\MANESH~1\AppData\Local\Temp\pip-wheel-6drcjrol' --python-tag cp37
       cwd: C:\Users\MANESH~1\AppData\Local\Temp\pip-install-zhaj3f4q\eif\
  Complete output (60 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.7
  copying eif_old.py -> build\lib.win-amd64-3.7
  copying version.py -> build\lib.win-amd64-3.7
  running egg_info
  writing eif.egg-info\PKG-INFO
  writing dependency_links to eif.egg-info\dependency_links.txt
  writing requirements to eif.egg-info\requires.txt
  writing top-level names to eif.egg-info\top_level.txt
  reading manifest file 'eif.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'eif.egg-info\SOURCES.txt'
  running build_ext
  cythoning _eif.pyx to _eif.cpp
  building 'eif' extension
  creating build\temp.win-amd64-3.7
  creating build\temp.win-amd64-3.7\Release
  C:\Users\Manesh Halai\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 "-IC:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include" "-IC:\Users\Manesh Halai\Anaconda3\include" "-IC:\Users\Manesh Halai\Anaconda3\include" -c _eif.cpp -o build\temp.win-amd64-3.7\Release\_eif.o -Wcpp
  In file included from C:/Users/Manesh Halai/Anaconda3/Library/mingw-w64/include/c++/5.3.0/random:35:0,
                   from eif.hxx:5,
                   from _eif.cpp:614:
  C:/Users/Manesh Halai/Anaconda3/Library/mingw-w64/include/c++/5.3.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
   #error This file requires compiler and library support for the \
    ^
  In file included from C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1824:0,
                   from C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:12,
                   from C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
                   from _eif.cpp:612:
  C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:15:77: note: #pragma message: C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
                            "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION")
                                                                               ^
  In file included from _eif.cpp:614:0:
  eif.hxx:11:28: error: 'std::mt19937_64' has not been declared
   #define RANDOM_ENGINE std::mt19937_64
                              ^
  eif.hxx:65:55: note: in expansion of macro 'RANDOM_ENGINE'
           void build_tree (double*, int, int, int, int, RANDOM_ENGINE&, int);
                                                         ^
  eif.hxx:11:28: error: 'std::mt19937_64' has not been declared
   #define RANDOM_ENGINE std::mt19937_64
                              ^
  eif.hxx:66:44: note: in expansion of macro 'RANDOM_ENGINE'
           Node* add_node (double*, int, int, RANDOM_ENGINE&);
                                              ^
  eif.hxx:11:28: error: 'std::mt19937_64' has not been declared
   #define RANDOM_ENGINE std::mt19937_64
                              ^
  eif.hxx:132:63: note: in expansion of macro 'RANDOM_ENGINE'
   inline std::vector<int> sample_without_replacement (int, int, RANDOM_ENGINE&);
                                                                 ^
  _eif.cpp: In function 'PyTypeObject* __Pyx_ImportType(PyObject*, const char*, const char*, size_t, __Pyx_ImportType_CheckSize)':
  _eif.cpp:8085:53: warning: unknown conversion type character 'z' in format [-Wformat=]
               module_name, class_name, size, basicsize);
                                                       ^
  _eif.cpp:8085:53: warning: unknown conversion type character 'z' in format [-Wformat=]
  _eif.cpp:8085:53: warning: too many arguments for format [-Wformat-extra-args]
  error: command 'C:\\Users\\Manesh Halai\\Anaconda3\\Library\\mingw-w64\\bin\\gcc.exe' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for eif
  Running setup.py clean for eif
Failed to build eif
Installing collected packages: eif
  Running setup.py install for eif ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Manesh Halai\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MANESH~1\\AppData\\Local\\Temp\\pip-install-zhaj3f4q\\eif\\setup.py'"'"'; __file__='"'"'C:\\Users\\MANESH~1\\AppData\\Local\\Temp\\pip-install-zhaj3f4q\\eif\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\MANESH~1\AppData\Local\Temp\pip-record-buit0qa2\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\MANESH~1\AppData\Local\Temp\pip-install-zhaj3f4q\eif\
    Complete output (60 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    copying eif_old.py -> build\lib.win-amd64-3.7
    copying version.py -> build\lib.win-amd64-3.7
    running egg_info
    writing eif.egg-info\PKG-INFO
    writing dependency_links to eif.egg-info\dependency_links.txt
    writing requirements to eif.egg-info\requires.txt
    writing top-level names to eif.egg-info\top_level.txt
    reading manifest file 'eif.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'eif.egg-info\SOURCES.txt'
    running build_ext
    skipping '_eif.cpp' Cython extension (up-to-date)
    building 'eif' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    C:\Users\Manesh Halai\Anaconda3\Library\mingw-w64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 "-IC:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include" "-IC:\Users\Manesh Halai\Anaconda3\include" "-IC:\Users\Manesh Halai\Anaconda3\include" -c _eif.cpp -o build\temp.win-amd64-3.7\Release\_eif.o -Wcpp
    In file included from C:/Users/Manesh Halai/Anaconda3/Library/mingw-w64/include/c++/5.3.0/random:35:0,
                     from eif.hxx:5,
                     from _eif.cpp:614:
    C:/Users/Manesh Halai/Anaconda3/Library/mingw-w64/include/c++/5.3.0/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
     #error This file requires compiler and library support for the \
      ^
    In file included from C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1824:0,
                     from C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:12,
                     from C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
                     from _eif.cpp:612:
    C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:15:77: note: #pragma message: C:\Users\Manesh Halai\Anaconda3\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(14) : Warning Msg: Using deprecated NumPy API, disable it with #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
                              "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION")
                                                                                 ^
    In file included from _eif.cpp:614:0:
    eif.hxx:11:28: error: 'std::mt19937_64' has not been declared
     #define RANDOM_ENGINE std::mt19937_64
                                ^
    eif.hxx:65:55: note: in expansion of macro 'RANDOM_ENGINE'
             void build_tree (double*, int, int, int, int, RANDOM_ENGINE&, int);
                                                           ^
    eif.hxx:11:28: error: 'std::mt19937_64' has not been declared
     #define RANDOM_ENGINE std::mt19937_64
                                ^
    eif.hxx:66:44: note: in expansion of macro 'RANDOM_ENGINE'
             Node* add_node (double*, int, int, RANDOM_ENGINE&);
                                                ^
    eif.hxx:11:28: error: 'std::mt19937_64' has not been declared
     #define RANDOM_ENGINE std::mt19937_64
                                ^
    eif.hxx:132:63: note: in expansion of macro 'RANDOM_ENGINE'
     inline std::vector<int> sample_without_replacement (int, int, RANDOM_ENGINE&);
                                                                   ^
    _eif.cpp: In function 'PyTypeObject* __Pyx_ImportType(PyObject*, const char*, const char*, size_t, __Pyx_ImportType_CheckSize)':
    _eif.cpp:8085:53: warning: unknown conversion type character 'z' in format [-Wformat=]
                 module_name, class_name, size, basicsize);
                                                         ^
    _eif.cpp:8085:53: warning: unknown conversion type character 'z' in format [-Wformat=]
    _eif.cpp:8085:53: warning: too many arguments for format [-Wformat-extra-args]
    error: command 'C:\\Users\\Manesh Halai\\Anaconda3\\Library\\mingw-w64\\bin\\gcc.exe' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Manesh Halai\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\MANESH~1\\AppData\\Local\\Temp\\pip-install-zhaj3f4q\\eif\\setup.py'"'"'; __file__='"'"'C:\\Users\\MANESH~1\\AppData\\Local\\Temp\\pip-install-zhaj3f4q\\eif\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\MANESH~1\AppData\Local\Temp\pip-record-buit0qa2\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

Я попытался найти похожие проблемы, но пока не нашел ничего, что относится полностью к моей проблеме. До сих пор я пытался обновить мой windows, обновить компилятор visual basi c, следуя инструкциям по этой ссылке (https://github.com/m-byte918/AgarOSS/issues/8), установить из репозитория github и обновить необходимые пакеты python пока без удачи. Любая помощь и идеи очень ценятся!

1 Ответ

0 голосов
/ 20 января 2020

Он пытается скомпилировать код C ++. Ваш компилятор (g cc 5.3.0) слишком стар, поскольку сообщение об ошибке подразумевает:

This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.

Обновление компилятора Visual Basi c не исправит это, вам нужен более новый g cc версия.

(Технически вы могли бы также как-то втиснуть флаг -std=c++11 во весь этот процесс, но я бы сказал, что обновление g cc будет проще.)

...