Home > Enterprise >  Couldn't find a pure Python 3 wheel for 'tensorflow'. You can use `micropip.install(.
Couldn't find a pure Python 3 wheel for 'tensorflow'. You can use `micropip.install(.

Time:08-22

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>
        

CodePudding user response:

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.

  • Related