您现在的位置是:首页 > 文章详情

Install Tensorflow 2.0 in Conda on Windows 10

日期:2019-10-18点击:388

初学机器学习,安装Tensorflow时遇到了点问题,环境是WIN10+CONDA,简单做个笔记记录一下。

正常通过CONDA INSTALL是无法安装TF2.0的,所以只能通过PIP安装,如果你安装后没有任何问题,那么恭喜你,因为我没这么幸运。安装后我遇到了下面的问题,这个问题我花了1个多小时才得以解决,因众所周知的原因,只能BAIDU+BING,尝试了好些方案后找到如下亲测靠谱方案,供大家参考。

简言之,其实就是环境变量没设对的问题,把CONDA的一些路径加入到PATH当中去就行了

ImportError: DLL load failed: The specified module could not be found.

Since there is no tensorflow 2.0 in Conda, you will have to resort to install it from pip command, following are steps to install tensorflow 2.0.

make sure you have pip command on your environment

conda list pip

image

if not, please install it first

conda install pip

image

  • Step 1: install tensorflow from pip, it will install the latest tensorflow which is 2.0 as of now @2019-10-19
pip install tensorflow
  • Step 2: open cmd to test tesorflow
import tensorflow as tf

The result should be as below:
image

  • Step 3 (additional): in case you have the following error message, please config your PATH environment
ImportError: DLL load failed: The specified module could not be found.

Open your Anaconda Prompt to check %PATH% configuration
image

Compare the %PATH% from your cmd

image

Add those missing path about Anacona to your account path or system path,below path is only for reference purpose which may vary from yours.
image

Test it again from python command, it should be resolved

原文链接:https://yq.aliyun.com/articles/721363
关注公众号

低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。

持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。

转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。

文章评论

共有0条评论来说两句吧...

文章二维码

扫描即可查看该文章

点击排行

推荐阅读

最新文章