lundi 20 janvier 2020

Getting a compiler error when trying to pip install a module

I am trying to install the eif module using pip install eif but I am getting the following error messaage:

 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.

I have attempted so search for similar issues but I haven't found anything yet that relates fully to my issue. So far I have tried updateing my windows, updating the visual basic compiler, following the instructions on this link (https://github.com/m-byte918/AgarOSS/issues/8), installing from the github repo and updating prequisite python packages with no luck so far. Any and all help/ideas is much appreciated!

Aucun commentaire:

Enregistrer un commentaire