jeffheaton / t81_558_deep_learning

T81-558: Keras - Applications of Deep Neural Networks @Washington University in St. Louis
https://sites.wustl.edu/jeffheaton/t81-558/
Other
5.71k stars 3.04k forks source link

Juypter notebook is not launching the latest version of tensorflow installed in the virtual environment #89

Closed ranijames closed 3 years ago

ranijames commented 3 years ago

Hi Jeff Heaton,

Thanks for the youtube post on installing tensorflow. I have followed the instructions and tried to install TensorFlow (2.2.0) on my ubuntu os. As per the instructions, I have created a virtual environment named as tensorflow. There I have installed tensorflow 2.2.0 using pip install tensorflow==2.2.0. If I list the available packages within the environment it lists tensorflow versions 2.2.0.

    conda list|grep tensorflow
# packages in environment at /home/user/anaconda3/envs/tensorflow:
tensorflow                2.2.0           mkl_py37h6e9ce2d_0  
tensorflow-base           2.2.0           mkl_py37hd506778_0    anaconda
tensorflow-estimator      2.2.0              pyh208ff02_0    anaconda

In addition to that, I have registered the tensorflow in ipython kernal as follws,

python -m ipykernel install --user --name tensorflow --display-name "Python 3.7 (tensorflow)"

However, when I try to import tensorflow via ipython or juypter as follows,

import tensorflow as tf
In [2]: print(f"Tensor Flow Version: {tf.__version__}")
   ...: 
Tensor Flow Version: 1.14.0

the version is 1.14.0 The python, ipython and juypter are within my tensorflow enironment.

(tensorflow) user@user-XPS-13-9370:~$ which python
/home/user/anaconda3/envs/tensorflow/bin/python
(tensorflow) user@user-XPS-13-9370:~$ which ipython
/home/user/anaconda3/envs/tensorflow/bin/ipython
(tensorflow) user@user-XPS-13-9370:~$which jupyter
/home/user/anaconda3/envs/tensorflow/bin/jupyter

Any help/suggestions are highly appreciated. Thanks

jeffheaton commented 3 years ago

To me, it feels like you have an old version installed somewhere and your path is not getting updates. I will give you some additional things to try soon.

jeffheaton commented 3 years ago

I am not able to reproduce this. I suggest completely rebuilding the environment, or asking through the Jupyter support/channels.