KeyError: '__reduce_cython__' when trying to import sklearn package into Django app #29010
alexleigh0
started this conversation in
General
Replies: 4 comments
-
Update: have changed my python version to 3.11.9, created a whole new venv, reinstalled every package and I'm still getting this issue. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I had the same problem but succeeded after installing Cython via |
Beta Was this translation helpful? Give feedback.
0 replies
-
I solved this problem by changing the order of import modules |
Beta Was this translation helpful? Give feedback.
0 replies
-
I restarted Jupyter kernel and it fixed it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Would massively appreciate help on this as I've been stuck for a while.
When attempting to run my Django app with
python manage.py runserver
, I am getting the following error relating to a scikit-learn module import:This is the last line in a larger error message, listed below. I have tried everything I've found online, including:
Despite this, every time I run python manage.py runserver I get the same error appearing.
Interestingly
from sklearn.feature_extraction.text import TfidfVectorizer
causes no issues, butfrom sklearn.metrics.pairwise import cosine_distances
is the line causing the issue.Full error stack:
Beta Was this translation helpful? Give feedback.
All reactions