前提需要大家翻墙的,安装好原来的TensorFlow,当然安装好conda。
其实主要有三步:
这里安装的cpu版本的,GPU类似的
# Current stable release for CPU-onlypip install tensorflow
# Preview nightly build for CPU-only (unstable)pip install tf-nightly
# Install TensorFlow 2.0 Alphapip install tensorflow==2.0.0-alpha0
如果在安装第二个命令即pip install tf-nightly有如下错误时:
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'c:\\programdata\\anaconda3\\lib\\site-packages\\~umpy\\core\\multiarray.cp36-win_amd64.pyd'
Consider using the `--user` option or check the permissions.
则需要在该命令加上--user即:
pip install --user tf-nightly
最后就可以安装成功。经测试: