Tensorflow installation error: not a supported wheel on this platform

后端 未结 13 1079
别跟我提以往
别跟我提以往 2020-11-29 01:53

when I try to install tensorflow by cloning from git, I run into the error \"no module named copyreg,\" so I tried installing using a virtualenv. However, I then run into th

13条回答
  •  醉梦人生
    2020-11-29 02:37

    I was trying to install CPU TF on Ubuntu 18.04, and the best way (for me...) I found for it was using it on top of Conda, for that:

    1. To create Conda ‘tensorflow’ env. Follow https://linuxize.com/post/how-to-install-anaconda-on-ubuntu-18-04/
    2. After all installed see https://conda.io/projects/conda/en/latest/user-guide/getting-started.html And use it according to https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#managing-environments
    3. conda create --name tensorflow
    4. source activate tensorflow
    5. pip install --upgrade pip
    6. pip install tensorflow-cpu==1.15
    7. pip install --ignore-installed --upgrade tensorflow
    8. Test TF E.g. on 'Where' with:

    python

    import tensorflow as tf
    

    tf.where([[True, False], [False, True]])

    expected result:

    
    
    • After Conda upgrade I got: DeprecationWarning: 'source deactivate' is deprecated. Use 'conda deactivate'.

    So you should use:

    ‘conda activate tensorflow’ / ‘conda deactivate’
    

提交回复
热议问题