UserWarning: NumPy was imported from a Python sub-interpreter

0

 





Whe you get the error message like:

[Fri Feb 09 14:44:16.693488 2024] [wsgi:error] [pid 13012:tid 281472973443264] [remote 81.82.223.150:61164] /usr/local/venvs/django_ner/lib/python3.10/site-packages/thinc/__init__.py:2: UserWarning: NumPy was imported from a Python sub-interpreter but NumPy does not properly support sub-interpreters. This will likely work for most users but might cause hard to track down issues or subtle bugs. A common user of the rare sub-interpreter feature is wsgi which also allows single-interpreter mode.
[Fri Feb 09 14:44:16.693987 2024] [wsgi:error] [pid 13012:tid 281472973443264] [remote 81.82.223.150:61164] Improvements in the case of bugs are welcome, but is not on the NumPy roadmap, and full support may require significant effort to achieve.
[Fri Feb 09 14:44:16.694006 2024] [wsgi:error] [pid 13012:tid 281472973443264] [remote 81.82.223.150:61164]   import numpy
[Fri Feb 09 14:44:36.134577 2024] [reqtimeout:info] [pid 13015:tid 281473074892992] [client 81.82.223.150:61165] AH01382: Request header read timeout


You have to add the line below to your httpd.conf:

# NumPy was imported from a Python sub-interpreter but NumPy does not properly support sub-interpreters.
WSGIApplicationGroup %{GLOBAL}

Source:

  • https://stackoverflow.com/questions/68849673/importing-numpy-shows-warning-when-running-in-mod-wsgi
  • https://code.google.com/archive/p/modwsgi/wikis/ApplicationIssues.wiki#Python_Simplified_GIL_State_API

Post a Comment

0 Comments

Post a Comment (0)

#buttons=(Ok, Go it!) #days=(20)

This site uses cookies from Google to deliver its services and analyze traffic. Your IP address and user-agent are shared with Google along with performance and security metrics to ensure quality of service, generate usage statistics, and to detect and address abuse. More Info
Ok, Go it!