如何安装谷歌2019.6.7发布的TensorFlow 2.0 Alpha,这里贴出安装过程,并测试成功

前提需要大家翻墙的,安装好原来的TensorFlow,当然安装好conda。

其实主要有三步:

这里安装的cpu版本的,GPU类似的

# Current stable release for CPU-only
pip install tensorflow

# Preview nightly build for CPU-only (unstable)
pip install tf-nightly

# Install TensorFlow 2.0 Alpha
pip 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

最后就可以安装成功。经测试:

猜你喜欢

转载自blog.csdn.net/weixin_42398658/article/details/91430252