Issue
I cannot seem to import Tensorflow or keras. I have windows 10 computer I have python 3.8.5 I installed the following using command pip3 install XXXXXXXXXX 1.matplotlib 2.pandas 3.numpy 4.Tensorflow 5.keras in that order
i have no problem importing matplotlib, pandas or numpy. but when I try to import tensorflow or keras, it cannot find the module (see screenshot provided) i also checked in cmd to ensure i have them installed (see screenshot)
FYI, I installed python in drive F: and windows is installed in drive C: is there a reason why I can import pandas, and not tensorflow or keras? any form of help would be highly appreciated!
screenshot on jupyter error:
Solution
what version of tensorflow do you want to install? My experience is to use Anaconda onda terminal to install tensorflow. First install tensorflow 2.1 using conda.Conda automatically installs cudnn 7.6.5 and CUDA Toolkit 10.1.243. These are compatible with tensorflow 2.2. Then use pip to install tensorflow 2.2 as shown below
pip install tensorflow ==2.2.0
Conda at this time can only install tensorflow up to 2.1 that is why you have to use pip. pip does not automatically install cudnn or the Cuda toolkit but you already have them installed when you install version 2.1 with Conda. Otherwise you would have to go through a more complicated process to manually install cudnn and the toolkit. Some people have reported problems using python 3.8 with tensorflow. If you run into that create as seperate environment and install python 3.7, tensorflow 2.1 using conda, then install tensorflow 2.2 using pip.
Answered By - Gerry P
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.