0

I have a small piece of code, which I cannot run in pycharm virtual environment

INPUT_FILE_PATH = './data/'
# Press the green button in the gutter to run the script.
if __name__ == '__main__':

    print_hi('PyCharm')
    print('loading data ... ')
    hemo_filename = INPUT_FILE_PATH + 'hemo_ALl_seq.txt'
    hemo_data = np.loadtxt(hemo_filename, delimiter='\t', skiprows=1, dtype=str)

It shows the following error and ends the running: Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

what could be the reason?

S.EB
  • 1,966
  • 4
  • 29
  • 54
  • [This answer](https://stackoverflow.com/a/48313226/18054760) could be useful to you – Abhinav Sep 25 '22 at 05:04
  • I suppose `np.loadtxt` is loading the file into memory and it's too large for the memory PyCharm makes available. See [one of these questions](https://stackoverflow.com/search?q=%5Bpycharm%5D+signal+6%3A+SIGABRT&searchOn=3) but I'm pretty sure this is more of a NumPy issue than a problem caused by the IDE. – bad_coder Sep 25 '22 at 05:57
  • Can you run it *outside* of pycharm (say from a terminal or cmd window) without error? If yes, it's a pycharm problem. If no, the problem is in your code. – Roland Smith Sep 25 '22 at 06:49
  • Have you found a suitable answer to your question? – Dolev Mitz Mar 27 '23 at 08:19

1 Answers1

0

I had the same error on a xubuntu machine.

Installing a JRE solved it for me. I followed this article.

Installing Oracle JDK was not necessary. I installed default-jre and default-jdk and set the JAVA_HOME environment variable + reboot.

Max
  • 31
  • 5