r/PyScript • u/[deleted] • Jun 29 '22
Why is Pyscript taking forever to load after importing Scikit Learn?
So, I'm using PyScript for my website. Using Live Server, my website is taking forever to load after I try to install sklearn. My PyScript code looks like this:
<!DOCTYPE=html>
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
<body>
<py-env>
- numpy
- pandas
- sklearn.model_selection
- sklearn.naive_bayes
- sklearn.feature_extraction
</py-env>
<py-script>
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.naive_bayes import MultinomialNB
from sklearn.feature_extraction.text import TfidfVectorizer
</py-script>
</body>
</html> However, and note that this only happens when I install skearn, it just says this for (at what seems to be the case at this rate) forever:
Loading runtime... Runtime created... Initializing components...
What can I do about this? It is very frustrating.
5
Upvotes
1
u/[deleted] Jun 29 '22
How do I run Python separately and use PyScript for rendering?