icydengyw

首先,将以前安装失败的虚拟环境删除

conda env remove -n tensorflow

随后,新建一个虚拟环境等等

conda create -n tensorflow-cpu python=3.6 
conda activate tensorflow-cpu
pip install tensorflow==1.14.0
#推荐使用pip安装keras:
pip install keras==2.2.5 -i https://pypi.tuna.tsinghua.edu.cn/simple/ 

#安装spyder和jupyter环境
conda install spyder #输入spyder直接进入环境
#安装jupyter环境
conda install ipykernel
pip install pypiwin32
pip install jupyter#conda install jupyer
python -m ipykernel install --user --name tensorflow-cpu --display-name "Python (tensorflow-cpu)"

 

测试是否成功

# Python
import tensorflow as tf
hello = tf.constant(\'Hello, TensorFlow!\')
sess = tf.Session()
print(sess.run(hello))

 

安装其他相关库

pip install opencv-python  #import cv2

  

https://www.cnblogs.com/phoenixash/p/12236949.html  (版本信息参考)

https://mirror.tuna.tsinghua.edu.cn/help/anaconda/  镜像修改

分类:

技术点:

相关文章:

  • 2020-04-18
  • 2021-12-03
  • 2021-12-03
  • 2021-07-19
  • 2021-09-15
  • 2021-08-07
  • 2021-11-30
  • 2021-09-27
猜你喜欢
  • 2021-04-20
  • 2021-11-20
  • 2021-12-03
  • 2021-09-08
  • 2021-11-20
  • 2021-09-04
  • 2021-12-03
相关资源
相似解决方案