The main problem is this blog about Pycharm installed under win10, and compatible use and Python3.6, in front of a blog introduced WIN10 deep learning environment to build Python3.6 + Tensorflow + CUDA8.0 + Anaconda3, using Python3 .6, so when Pycharm configuration should pay attention to the problem of the compiler, import tensorflow will fail otherwise in Pycharm in.
WIN10 deep learning environment to build Tensorflow + CUDA8.0 + + Python3.6 Anaconda3:
http://blog.csdn.net/weixin_38285131/article/details/79416592
Summary of issues:
introducing tensorflow failed Pycharm the
Import tensorflow AS TF
ModuleNotFoundError: No Module1 the named 'tensorflow'
as shown below:
Solution:
Modify the project compiler, as described above, are the steps the compiler to choose the compiler under conda environment, so that you can the
compiler file folder conda environment generally: ... \ Anaconda3.5.1 \ envs \ tensorflow \ python.exe
Reason:
This is because python.exe under the anaconda file is version 3.6, and conda environment you create is in the anaconda, and you install tensorflow in conda environment, not in the anaconda environment, so if you want to import tensorflow , you should need interpreter chosen python.exe environment under conda
Installation and activation of a Dian Pycharm
Pycharm description:
PyCharm is a Python IDE, it can help users with a set of productivity tools to improve their use Python language development, such as debugging, syntax highlighting, Project management, code branches, IntelliSense, auto-complete, unit testing ,version control. In addition, the IDE provides some advanced features, support for professional Web development under the Django framework.
Download
http://www.jetbrains.com/pycharm/download/#section=windows
Installation:
Select the installation folder:
Activate Pycharm:
The following compiler option is Pycharm + key Python3.6 configuration, or will be error, the first time I picked the wrong compiler, import tensorflow failure
interpreter selection: anaconda-> envs-> tenfowflow-> python.exe, to choose python.exe compiler under conda environment, because we installed tensorflow is installed under the conda environment,
Test run it:
import tensorflow as tf
print('hello')
As shown, there is no problem, the successful installation PyCharm
Reference:
https://www.cnblogs.com/yingchuan-hxf/p/7715575.html
http://blog.csdn.net/qq_29883591/article/details/52664478