'Tensorflow is partially imported
Solution 1:[1]
This is due to Python
and TensorFlow
being installed only in your anaconda environment.
- To access
TensorFlow
from command prompt rather thananaconda prompt
, you need to follow the steps below:
Open command prompt
as administrator (by right click and selecting run as administrator)
C:\windows\system32\python # (This will show if python is installed in this directory or can install the latest python)
C:\windows\system32\pip install --upgrade pip
C:\windows\system32\pip install tensorflow (to install tensorflow in same path)
C:\windows\system32\python>>import tensorflow as tf >>print(tf.__version__) #to check if tensorflow installed successfully an dis accessible
- To access
TensorFlow
through VS code, you need to install python extension for VS code after installing VS code in your system. After successful installation of extension, you can click on "Create new Jupyter notebook" and select the appropriate Python interpreter as in Anaconda.
Now the VS code is ready to run TensorFlow
code.
Please check this link for your reference.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | TFer2 |