I am simply trying to run python (interactively) in cygwin, but whenever I try to print out a numpy array or write a pandas dataframe to a csv file python prints out :
Segmentation fault (core dumped)
To run numpy/pandas I installed with cygwin set-up.exe:
- gcc-core 11.2.0-1
- gcc-fortran 11.2.0-1
- gcc-g++ 11.2.0-1
- make 4.3-1
- python38
- python38-cython
- python38-devel
- python38-numpy
- python38-pip
- python38-setuptools
- python38-six
- python38-wheel
- wget 1.21.2-1
I'd like to emphasize that python prints out the message, it's not an error message, apparently. The problem arises whenever I do something as simple as the following:
In cygwin terminal:
$ python3
>>> import numpy
>>> numpy.random.random(20)
Segmentation fault (core dumped)
$
But it doesn't happen when I do this (printing the first element of the array):
$ python3
>>> import numpy
>>> numpy.random.random(20)[0]
0.5200677516279423
>>>
Nor when I do this (print another numpy.ndarray of integers):
$ python3
>>> import numpy
>>> numpy.random.ranint(1, 20, 100)
array([13, 2, 10, 14, 11, 13, 16, 16, 13, 7, 14, 13, 1, 19, 8, 6, 3,
7, 2, 15, 18, 7, 17, 16, 17, 2, 19, 13, 12, 11, 16, 8, 19, 4,
19, 8, 12, 11, 13, 15, 7, 16, 11, 18, 16, 14, 13, 13, 19, 1, 18,
3, 16, 12, 19, 3, 5, 6, 19, 15, 11, 18, 12, 12, 18, 16, 16, 11,
7, 9, 2, 18, 17, 10, 17, 11, 10, 2, 4, 16, 7, 9, 9, 7, 17,
3, 11, 4, 14, 17, 4, 4, 2, 3, 10, 7, 1, 8, 2, 16])
>>>
I am unfortunately not an expert in any way. Any help or discussion is greatly appreciated you guys.
Thank you!
Update
I found another equipment in which numpy runs OK and decided to downgrade the dependencies I know of (listed above), and it still does not work.
- gcc-core 10.2.0-1
- gcc-fortran 10.2.0-1
- gcc-g++ 10.2.0-1
- make 4.3-1
- wget 1.21.2-1
Please have in mind that no version of python (3.6, 3.8 y 3.9) runs numpy (same error).
Do you know what other package could be causing this issue?
Do you think it would work if I downgrade cygwin itself?