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

Visual Studio failed with exit status 2 #49

Closed
JacobPfau opened this issue Oct 10, 2018 · 15 comments
Closed

Visual Studio failed with exit status 2 #49

JacobPfau opened this issue Oct 10, 2018 · 15 comments
Labels
Install Errors in the installation process. Windows Issues on windows machines.

Comments

@JacobPfau
Copy link

JacobPfau commented Oct 10, 2018

Hi,
I tried to install ripser, but I ran into a couple error messages. First I had a building wheel error which appears to be resolved by adding "--no-cache-dir" to the install command. Then I ran into an error apparently with Visual Studio: "error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit status 2".

I've tried reinstalling VS with the 2017 version as well, and a similar error occurs.

(base) C:\Users\jacob>pip install --no-cache-dir ripser
Collecting ripser
  Downloading https://files.pythonhosted.org/packages/20/59/302dab2f1be85f32c57bdf8d4595d0437db76131b13504025abfc8373b03/ripser-0.3.0.tar.gz (71kB)
    100% |████████████████████████████████| 71kB 2.2MB/s
Requirement already satisfied: Cython in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (0.28.5)
Requirement already satisfied: numpy in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (1.15.2)
Requirement already satisfied: scipy in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (1.1.0)
Requirement already satisfied: matplotlib in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (2.2.3)
Requirement already satisfied: scikit-learn in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (0.19.2)
Requirement already satisfied: cycler>=0.10 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (2.2.0)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (2.7.3)
Requirement already satisfied: pytz in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (2018.5)
Requirement already satisfied: six>=1.10 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (1.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (1.0.1)
Requirement already satisfied: setuptools in c:\users\jacob\anaconda3\lib\site-packages (from kiwisolver>=1.0.1->matplotlib->ripser) (40.4.3)
Installing collected packages: ripser
  Running setup.py install for ripser ... error
    Complete output from command c:\users\jacob\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jacob\\AppData\\Local\\Temp\\pip-install-n_efm1ru\\ripser\\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\jacob\AppData\Local\Temp\pip-record-sm30oijf\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\ripser
    copying ripser\ripser.py -> build\lib.win-amd64-3.7\ripser
    copying ripser\_version.py -> build\lib.win-amd64-3.7\ripser
    copying ripser\__init__.py -> build\lib.win-amd64-3.7\ripser
    running build_ext
    building 'pyRipser' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    creating build\temp.win-amd64-3.7\Release\ripser
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DUSE_COEFFICIENTS=1 -DNDEBUG=1 -DASSEMBLE_REDUCTION_MATRIX=1 -I.\ripser -Ic:\users\jacob\anaconda3\include -Ic:\users\jacob\anaconda3\include -Ic:\users\jacob\anaconda3\lib\site-packages\numpy\core\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpripser/pyRipser.cpp /Fobuild\temp.win-amd64-3.7\Release\ripser/pyRipser.obj -std=c++11 -Ofast -D_hypot=hypot
    cl : Command line warning D9025 : overriding '/Os' with '/Ot'
    cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
    cl : Command line warning D9002 : ignoring unknown option '-Of'
    cl : Command line warning D9002 : ignoring unknown option '-Oa'
    pyRipser.cpp
    c:\users\jacob\anaconda3\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): error C2079: 'packed' uses undefined struct '__attribute__'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): error C2146: syntax error: missing ';' before identifier 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(102): error C2275: 'index_t': illegal use of this type as an expression
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(55): note: see declaration of 'index_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(102): error C2146: syntax error: missing ')' before identifier 'index'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(102): error C2059: syntax error: 'constant'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(105): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(105): error C2365: 'entry_t': redefinition; previous definition was 'data variable'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(105): error C2550: 'entry_t': constructor initializer lists are only allowed on constructor definitions
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(106): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(106): error C2365: 'entry_t': redefinition; previous definition was 'data variable'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(106): error C2550: 'entry_t': constructor initializer lists are only allowed on constructor definitions
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(107): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(107): error C2365: 'entry_t': redefinition; previous definition was 'data variable'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(107): error C2550: 'entry_t': constructor initializer lists are only allowed on constructor definitions
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(108): error C2059: syntax error: '}'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(108): error C2143: syntax error: missing ';' before '}'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(112): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(112): error C2086: 'int entry_t': redefinition
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(112): error C2146: syntax error: missing ';' before identifier 'make_entry'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(112): error C2143: syntax error: missing ';' before '{'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(112): error C2447: '{': missing function header (old-style formal list?)
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(115): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(115): error C2143: syntax error: missing ',' before '&'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(115): error C2065: 'e': undeclared identifier
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(115): error C2228: left of '.index' must have class/struct/union
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(115): note: type is 'unknown-type'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(116): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(116): error C2143: syntax error: missing ',' before '&'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(116): error C2065: 'e': undeclared identifier
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(116): error C2228: left of '.coefficient' must have class/struct/union
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(116): note: type is 'unknown-type'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(117): error C2065: 'e': undeclared identifier
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(117): error C2059: syntax error: 'const'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(117): error C2143: syntax error: missing ';' before '{'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(117): error C2447: '{': missing function header (old-style formal list?)
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(119): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(119): error C2143: syntax error: missing ',' before '&'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(119): error C2803: 'operator ==' must have at least one formal parameter of class type
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(119): error C2805: binary 'operator ==' has too few parameters
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(120): error C2065: 'e1': undeclared identifier
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(120): error C2065: 'e2': undeclared identifier
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(123): error C2143: syntax error: missing ',' before '&'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(124): error C2065: 'e': undeclared identifier
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(138): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(138): error C2143: syntax error: missing ';' before '&'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(138): error C2373: 'entry_t': redefinition; different type modifiers
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(138): error C2143: syntax error: missing ',' before '&'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(138): error C2059: syntax error: '{'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(138): error C2143: syntax error: missing ';' before '{'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(138): error C2447: '{': missing function header (old-style formal list?)
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(144): error C2923: 'std::pair': 'entry_t' is not a valid template type argument for parameter '_Ty2'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(144): error C2955: 'std::pair': use of class template requires template argument list
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\utility(76): note: see declaration of 'std::pair'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(147): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(147): error C2143: syntax error: missing ',' before '&'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(147): error C2923: 'std::pair': 'entry_t' is not a valid template type argument for parameter '_Ty2'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(147): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(147): error C2065: 'e': undeclared identifier
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(147): error C2614: 'diameter_entry_t': illegal member initialization: 'pair' is not a base or member
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(148): error C2923: 'std::pair': 'entry_t' is not a valid template type argument for parameter '_Ty2'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(149): error C3861: 'make_entry': identifier not found
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(148): error C2614: 'diameter_entry_t': illegal member initialization: 'pair' is not a base or member
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(150): error C2923: 'std::pair': 'entry_t' is not a valid template type argument for parameter '_Ty2'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(152): error C3861: 'make_entry': identifier not found
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(152): error C2614: 'diameter_entry_t': illegal member initialization: 'pair' is not a base or member
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(157): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(157): error C2143: syntax error: missing ';' before '&'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(157): error C2373: 'entry_t': redefinition; different type modifiers
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(157): error C2059: syntax error: '{'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(157): error C2143: syntax error: missing ';' before '{'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(157): error C2447: '{': missing function header (old-style formal list?)
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(158): error C2143: syntax error: missing ';' before '&'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(158): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(158): error C2086: 'int entry_t': redefinition
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(101): note: see declaration of 'entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(158): error C2059: syntax error: '{'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(158): error C2143: syntax error: missing ';' before '{'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(158): error C2447: '{': missing function header (old-style formal list?)
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(161): warning C4244: 'return': conversion from 'index_t' to 'const coefficient_t', possible loss of data
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(163): error C2039: 'first': is not a member of 'diameter_entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(144): note: see declaration of 'diameter_entry_t'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(165): error C2664: 'void set_coefficient(diameter_entry_t &,const coefficient_t)': cannot convert argument 1 from 'int' to 'diameter_entry_t &'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(984): error C2664: 'ripser<sparse_distance_matrix>::simplex_coboundary_enumerator::simplex_coboundary_enumerator(ripser<sparse_distance_matrix>::simplex_coboundary_enumerator &&)': cannot convert argument 3 from 'ripser<sparse_distance_matrix>' to 'const ripser &'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(984): note: Reason: cannot convert from 'ripser<sparse_distance_matrix>' to 'const ripser'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(984): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(826): error C2662: 'OutputIterator ripser<DistanceMatrix>::get_simplex_vertices<std::_Vector_iterator<std::_Vector_val<std::_Simple_types<__int64>>>>(index_t,const index_t,index_t,OutputIterator) const': cannot convert 'this' pointer from 'const ripser' to 'const ripser<DistanceMatrix> &'
            with
            [
                OutputIterator=std::_Vector_iterator<std::_Vector_val<std::_Simple_types<__int64>>>
            ]
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(826): note: Reason: cannot convert from 'const ripser' to 'const ripser<DistanceMatrix>'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(826): note: Conversion requires a second user-defined-conversion operator or constructor
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(877): error C2039: 'back_inserter': is not a member of 'std'
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE\unordered_map(14): note: see declaration of 'std'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(877): error C3861: 'back_inserter': identifier not found
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(899): error C2662: 'index_t ripser<DistanceMatrix>::get_next_vertex(index_t &,const index_t,const index_t) const': cannot convert 'this' pointer from 'const ripser' to 'const ripser<DistanceMatrix> &'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(899): note: Reason: cannot convert from 'const ripser' to 'const ripser<DistanceMatrix>'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(899): note: Conversion requires a second user-defined-conversion operator or constructor
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(908): error C2662: 'index_t ripser<DistanceMatrix>::get_next_vertex(index_t &,const index_t,const index_t) const': cannot convert 'this' pointer from 'const ripser' to 'const ripser<DistanceMatrix> &'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(908): note: Reason: cannot convert from 'const ripser' to 'const ripser<DistanceMatrix>'
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(908): note: Conversion requires a second user-defined-conversion operator or constructor
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(1067): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(1072): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(1088): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
    c:\users\jacob\appdata\local\temp\pip-install-n_efm1ru\ripser\ripser\ripser.cpp(1105): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
    ripser/pyRipser.cpp(1890): warning C4244: '=': conversion from 'npy_intp' to 'int', possible loss of data
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

    ----------------------------------------
Command "c:\users\jacob\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jacob\\AppData\\Local\\Temp\\pip-install-n_efm1ru\\ripser\\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\jacob\AppData\Local\Temp\pip-record-sm30oijf\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\jacob\AppData\Local\Temp\pip-install-n_efm1ru\ripser\
@ctralie
Copy link
Member

ctralie commented Oct 10, 2018

Hello Jacob,
Sorry for the trouble, and thank you for the detailed bug report!

Unfortunately, ripser.py doesn't support the Visual Studio compiler. We actually have a prebuilt binary on pypi that was built with mingw. I believe this is the download link for the mingw runtimes
https://sourceforge.net/projects/mingw-w64/
Installing it alongside VS shouldn't be a problem.

So try installing the mingw runtimes, and then try ``pip install ripser'' again (you'll have to elaborate on the --no-cache-dir if that happens again...I haven't heard of that before. You're not downloading the source, are you)?)

Let me know if that works, and sorry again for the trouble
-Chris

@JacobPfau
Copy link
Author

JacobPfau commented Oct 11, 2018

Ok thanks for the pointer. As I understand it, to use a non-default compiler you have to manually download and then build using --compiler=mingw32. I tried this as shown below, but I received a new error message.

C:\Users\jacob\ripser-0.3.0>python setup.py build --compiler=mingw32
running build
running build_py
running build_ext
building 'pyRipser' extension
C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -DUSE_COEFFICIENTS=1 -DNDEBUG=1 -DASSEMBLE_REDUCTION_MATRIX=1 -I.\ripser -IC:\Users\jacob\Anaconda3\include -IC:\Users\jacob\Anaconda3\include -IC:\Users\jacob\Anaconda3\lib\site-packages\numpy\core\include -c ripser/pyRipser.cpp -o build\temp.win-amd64-3.7\Release\ripser\pyripser.o -std=c++11 -Ofast -D_hypot=hypot
In file included from C:\Users\jacob\Anaconda3\lib\site-packages\numpy\core\include/numpy/ndarraytypes.h:1821,
                 from C:\Users\jacob\Anaconda3\lib\site-packages\numpy\core\include/numpy/ndarrayobject.h:18,
                 from C:\Users\jacob\Anaconda3\lib\site-packages\numpy\core\include/numpy/arrayobject.h:4,
                 from ripser/pyRipser.cpp:619:
C:\Users\jacob\Anaconda3\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h:13:79: note: #pragma message: C:\Users\jacob\Anaconda3\lib\site-packages\numpy\core\include/numpy/npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
                          "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION")
                                                                               ^
ripser/pyRipser.cpp: In function 'PyTypeObject* __Pyx_ImportType(const char*, const char*, size_t, int)':
ripser/pyRipser.cpp:8275:13: warning: unknown conversion type character 'z' in format [-Wformat=]
             "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd",
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ripser/pyRipser.cpp:8275:13: warning: unknown conversion type character 'z' in format [-Wformat=]
ripser/pyRipser.cpp:8275:13: warning: too many arguments for format [-Wformat-extra-args]
In file included from ripser/pyRipser.cpp:626:
ripser/ripser.cpp: In instantiation of 'void ripser<DistanceMatrix>::compute_pairs(std::vector<std::pair<float, long long int> >&, hash_map<long long int, long long int>&, index_t) [with DistanceMatrix = compressed_distance_matrix<(compressed_matrix_layout)0>; index_t = long long int]':
ripser/ripser.cpp:800:5:   required from 'void ripser<DistanceMatrix>::compute_barcodes() [with DistanceMatrix = compressed_distance_matrix<(compressed_matrix_layout)0>]'
ripser/ripser.cpp:1031:22:   required from here
ripser/ripser.cpp:651:58: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'index_t' {aka 'long long int'} [-Wsign-compare]
    bool might_be_apparent_pair = (index_column_to_reduce == index_column_to_add);
                                  ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
ripser/ripser.cpp: In instantiation of 'void ripser<DistanceMatrix>::compute_pairs(std::vector<std::pair<float, long long int> >&, hash_map<long long int, long long int>&, index_t) [with DistanceMatrix = sparse_distance_matrix; index_t = long long int]':
ripser/ripser.cpp:800:5:   required from 'void ripser<DistanceMatrix>::compute_barcodes() [with DistanceMatrix = sparse_distance_matrix]'
ripser/ripser.cpp:1036:22:   required from here
ripser/ripser.cpp:651:58: warning: comparison of integer expressions of different signedness: 'size_t' {aka 'long long unsigned int'} and 'index_t' {aka 'long long int'} [-Wsign-compare]
writing build\temp.win-amd64-3.7\Release\ripser\pyRipser.cp37-win_amd64.def
C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\g++.exe -shared -s build\temp.win-amd64-3.7\Release\ripser\pyripser.o build\temp.win-amd64-3.7\Release\ripser\pyRipser.cp37-win_amd64.def -LC:\Users\jacob\Anaconda3\libs -LC:\Users\jacob\Anaconda3\PCbuild\amd64 -lpython37 -lmsvcr140 -o build\lib.win-amd64-3.7\pyRipser.cp37-win_amd64.pyd
C:/Program Files/mingw-w64/x86_64-8.1.0-posix-seh-rt_v6-rev0/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lmsvcr140
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\g++.exe' failed with exit status 1

@sauln
Copy link
Member

sauln commented Oct 11, 2018

Have you tried installing without the flag? Once MinGW is installed, please try just the command

pip install ripser

@JacobPfau
Copy link
Author

JacobPfau commented Oct 11, 2018

Yes I've tried that. I may be misunderstanding things, but I believe installing MinGW doesn't change the default compiler used by pip. I still get the same error message I did the first time.

I've also tried using MinGW by the command
pip install --global-option build_ext --global-option --compiler=mingw32 ripser

@sauln
Copy link
Member

sauln commented Oct 11, 2018

My apologies for the trouble, thanks for bearing with us. Windows is a weakness of mine.

I think if you add MinGW to your path, it might fix the problem. That was the solution in #46.

@JacobPfau
Copy link
Author

JacobPfau commented Oct 11, 2018

That error came after adding MinGW to my path i.e. C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;

If I do not add MinGW to my path I get a different error. See below. Thanks for bearing with me too, this seems to be more of a compiler issue on my end rather than a ripser issue. Perhaps the guy in the other thread installed a different version of MinGW? I'll take a look.

(base) C:\Users\jacob>pip install --global-option build_ext --global-option --compiler=mingw32 ripser
c:\users\jacob\anaconda3\lib\site-packages\pip\_internal\commands\install.py:211: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Collecting ripser
  Using cached https://files.pythonhosted.org/packages/20/59/302dab2f1be85f32c57bdf8d4595d0437db76131b13504025abfc8373b03/ripser-0.3.0.tar.gz
Requirement already satisfied: Cython in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (0.28.5)
Requirement already satisfied: numpy in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (1.15.2)
Requirement already satisfied: scipy in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (1.1.0)
Requirement already satisfied: matplotlib in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (2.2.3)
Requirement already satisfied: scikit-learn in c:\users\jacob\anaconda3\lib\site-packages (from ripser) (0.19.2)
Requirement already satisfied: cycler>=0.10 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (2.2.0)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (2.7.3)
Requirement already satisfied: pytz in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (2018.5)
Requirement already satisfied: six>=1.10 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (1.11.0)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\jacob\anaconda3\lib\site-packages (from matplotlib->ripser) (1.0.1)
Requirement already satisfied: setuptools in c:\users\jacob\anaconda3\lib\site-packages (from kiwisolver>=1.0.1->matplotlib->ripser) (40.4.3)
Skipping bdist_wheel for ripser, due to binaries being disabled for it.
Installing collected packages: ripser
  Running setup.py install for ripser ... error
    Complete output from command c:\users\jacob\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jacob\\AppData\\Local\\Temp\\pip-install-y5svum36\\ripser\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext --compiler=mingw32 install --record C:\Users\jacob\AppData\Local\Temp\pip-record-_iag3n9o\install-record.txt --single-version-externally-managed --compile:
    running build_ext
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\jacob\AppData\Local\Temp\pip-install-y5svum36\ripser\setup.py", line 77, in <module>
        cmdclass={'build_ext': CustomBuildExtCommand},
      File "c:\users\jacob\anaconda3\lib\site-packages\setuptools\__init__.py", line 140, in setup
        return distutils.core.setup(**attrs)
      File "c:\users\jacob\anaconda3\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\jacob\anaconda3\lib\distutils\dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "c:\users\jacob\anaconda3\lib\distutils\dist.py", line 985, in run_command
        cmd_obj.run()
      File "C:\Users\jacob\AppData\Local\Temp\pip-install-y5svum36\ripser\setup.py", line 49, in run
        build_ext.run(self)
      File "c:\users\jacob\anaconda3\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
        _build_ext.build_ext.run(self)
      File "c:\users\jacob\anaconda3\lib\distutils\command\build_ext.py", line 308, in run
        force=self.force)
      File "c:\users\jacob\anaconda3\lib\distutils\ccompiler.py", line 1031, in new_compiler
        return klass(None, dry_run, force)
      File "c:\users\jacob\anaconda3\lib\distutils\cygwinccompiler.py", line 285, in __init__
        CygwinCCompiler.__init__ (self, verbose, dry_run, force)
      File "c:\users\jacob\anaconda3\lib\distutils\cygwinccompiler.py", line 129, in __init__
        if self.ld_version >= "2.10.90":
    TypeError: '>=' not supported between instances of 'NoneType' and 'str'

    ----------------------------------------
Command "c:\users\jacob\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\jacob\\AppData\\Local\\Temp\\pip-install-y5svum36\\ripser\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" build_ext --compiler=mingw32 install --record C:\Users\jacob\AppData\Local\Temp\pip-record-_iag3n9o\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\jacob\AppData\Local\Temp\pip-install-y5svum36\ripser\

@sauln
Copy link
Member

sauln commented Oct 11, 2018

This SO thread might have the solution: https://stackoverflow.com/a/45096737/8054875

@ctralie
Copy link
Member

ctralie commented Oct 11, 2018 via email

@JacobPfau
Copy link
Author

In the end I used linux instead, and installation worked fine.

@ctralie
Copy link
Member

ctralie commented Oct 15, 2018 via email

@jiadongdan
Copy link

Is there any python 3.7 version of wheel file? I am on windows too, cp36 said not a support on this platform.

@jiadongdan
Copy link

Is it possible to make pip install work on windows by modifying the setup file?

@sauln
Copy link
Member

sauln commented Nov 16, 2018

@GeekMe93 I'm working on Python 3.7 wheels and will try to have them up before the end of the ay.

@sauln sauln closed this as completed Mar 2, 2019
@sauln sauln added Install Errors in the installation process. Windows Issues on windows machines. labels Mar 23, 2019
@kezard
Copy link

kezard commented Nov 22, 2020

Hi, I can pip ripser 0.6.0 successfully, but when I import it in the compile error comes:
image
I can't get the package "pyRipser" or It has been removed? so I can't call the package"ripser" successfuly... Is there anybody has the same problem with me ?

@ctralie
Copy link
Member

ctralie commented Nov 22, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Install Errors in the installation process. Windows Issues on windows machines.
Projects
None yet
Development

No branches or pull requests

5 participants