[FIXED] Couldn't find a pure Python 3 wheel for 'tensorflow'. You can use `micropip.install(…, keep_going=True)` to get a list of all packages

Issue

I want to use tensorflow in pyscript but it always throws this error. Please help me out.

    <py-env>
    - numpy
    - tensorflow
    - nltk
    </py-env>
    <body>
    <py-script>
        import random
        import json
        import pickle
        import numpy as np
        import nltk
        from nltk.stem import WordNetLemmatizer
        
        intents = json.loads(open("./intents.json").read())
        import tensorflow as tf
        
        keras = tf.keras
        from keras.models import load_model
        //further code..
    </py-script>
        

Solution

PyScript can’t run anything that has a C component to be compiled. That’s why the error refers to a "pure Python" wheel. Bottom line, you can’t use tensorflow in a browser.

Answered By – Tim Roberts

Answer Checked By – Pedro (Easybugfix Volunteer)

Leave a Reply

(*) Required, Your email will not be published