Home > Mobile >  Why does importing numpy prints 2313 to the screen?
Why does importing numpy prints 2313 to the screen?

Time:12-20

I'm seeing this really strange behavior where my script outputs the number 2313 when I import numpy. It annoys me, but I don't know why it happens and what I can do about it. I'm using python 3.11.0 and numpy version 1.23.4.

When my script is empty and I run it, nothing happens. However, when I write:

import numpy as np

with the rest of my script still completely empty, I get the output:

output to screen

Does anyone have a clue?

CodePudding user response:

Running the debugger gave me the following error message:

AttributeError: module 'signal' has no attribute 'SIGINT'

This led me to this question: Python3 AttributeError: module 'signal' has no attribute 'getsignal'

This is practically the same problem, with the same solution. There was a local file name signal.py which turned out to print the value 2313 to the screen. Renaming that file solved the issue.

  • Related