[FAQ] ImportError: scipy._cyutility does not export expected C function slice_memviewslice when importing sklearn

Aperta
#538 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

  • #539 di @github-actions — chiusa senza merge

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
20/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
numpy, python, scikit-learn
Ambito
documentation

Direzione di ricerca

The proposed FAQ entry is already drafted in the issue body, and pull request #539 is open against it, so check that PR before doing anything else. Compare its wording with the Q/A text here and with the existing machine-learning-zoomcamp FAQ file in the DataTalksClub/faq repository. Done means the entry is in the FAQ file once and the PR is merged or closed.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

faq-proposal
Course

machine-learning-zoomcamp

Question

Q: ImportError: scipy._cyutility does not export expected C function slice_memviewslice when importing sklearn
The scipy install is broken or mismatched with numpy or scikit-learn, usually after a pip install (for example xgboost) into a conda environment. Reinstall them together with python -m pip install --force-reinstall --no-cache-dir scipy numpy scikit-learn, restart the kernel, and consider using a dedicated conda environment so pip and conda packages don’t clash.

Answer

A: The scipy install is broken or mismatched with numpy or scikit-learn, usually after a pip install into a conda environment. Reinstall them together with python -m pip install --force-reinstall --no-cache-dir scipy numpy scikit-learn, restart the kernel, and consider a dedicated conda environment so pip and conda packages don’t clash.

Checklist
  • I have searched existing FAQs and this question is not already answered
  • The answer provides accurate, helpful information
  • I have included any relevant code examples or links
Lingua principale
Python
Stelle
8
Fork
20
Merge medio
4g 12h
PR unite (30g)
26

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DataTalksClub/faq

Tutte le issue di DataTalksClub/faq

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.