Comments (15)
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
from ripser.py.
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
from ripser.py.
Have you tried installing without the flag? Once MinGW is installed, please try just the command
pip install ripser
from ripser.py.
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
from ripser.py.
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.
from ripser.py.
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\
from ripser.py.
This SO thread might have the solution: https://stackoverflow.com/a/45096737/8054875
from ripser.py.
from ripser.py.
In the end I used linux instead, and installation worked fine.
from ripser.py.
from ripser.py.
Is there any python 3.7 version of wheel file? I am on windows too, cp36 said not a support on this platform.
from ripser.py.
Is it possible to make pip install work on windows by modifying the setup file?
from ripser.py.
@GeekMe93 I'm working on Python 3.7 wheels and will try to have them up before the end of the ay.
from ripser.py.
Hi, I can pip ripser 0.6.0 successfully, but when I import it in the compile error comes:
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 ?
from ripser.py.
from ripser.py.
Related Issues (20)
- Build failure on GNU/Linux (GCC 11.1.0 and Python 3.9.6 on Arch Linux) HOT 3
- Jupyter notebook crash on input of large sparse distance matrix HOT 1
- [Suggestion] Throw exception when computing bottleneck distance
- Dead comments in 0-dimensional computation/preferential treatment of edges with zero value
- get_greedy_perm (Samples)
- Get the indices of the vectors forming a hole HOT 2
- Install Ripser on ArchLinux HOT 2
- ld: cannot find /lib64/libpthread.so.0
- `ValueError: numpy.ndarray size changed` HOT 5
- Failed to build ripser, error: subprocess-exited-with-error HOT 6
- Knowing required RAM to run ripser
- Unsuccessful installation HOT 2
- Is there a way to get ripser to use virtual memory? HOT 2
- Failed building wheel for Ripser on Win11 HOT 3
- ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject HOT 1
- Failed building wheel for ripser HOT 1
- Failing to generate H1 result with small dataset. HOT 1
- A potential issue with the `lower_star_img` function with negative numbers HOT 9
- Missing wheels for 0.6.5 HOT 5
- Fix failing docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ripser.py.