# Updating Tensorflow

**URL:** <https://community.deeplearning.ai/t/updating-tensorflow/3508>\
**Category:** Convolutional Neural Networks\
**Tags:** coursera-platform\
**Created:** [May 5, 2021, 9:39pm UTC](https://community.deeplearning.ai/t/updating-tensorflow/3508 "2021-05-05T21:39:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![EduardoChicago](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@EduardoChicago](https://community.deeplearning.ai/u/EduardoChicago)\
**Post date:** [May 5, 2021, 9:39pm UTC](https://community.deeplearning.ai/t/updating-tensorflow/3508/1 "2021-05-05T21:39:02Z")

</div>

To implement ResNets in my local environment I realize that I have to update tensorflow to 2.0 or higher versions.  
I had the version 1.4 that comes with conda. Seeing that the conventional wisdom is against installing the update with PIL, I did it with

> conda install tensorflow==2.0

and then tried the simple

> import tensorflow as tf

I got a scary error

> ERROR! Session/line number was not unique in database. History logging moved to new session 59

After that, I got more errors (actually, 3) , of the type

> ERROR:root:Internal Python error in the inspect module.  
> Below is the traceback from this internal error.

Here is a sample piece of the long traceback.

> ImportError: cannot import name ‘random\_uniform’ from ‘tensorflow.keras.initializers’ (C:.…py)  
> During handling of the above exception, another exception occurred:  
> …  
> AttributeError: ‘ImportError’ object has no attribute ‘_render\_traceback_’  
> During handling of the above exception, another exception occurred: etc.

Obviously, updating tensorflow is above my pay grade 🤕  
Any suggestions? how to create a local environment with the current tensorflow version?

---

<div class="post-metadata">

**Author:** ![Mubsi](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mubsi/32/94983_2.png) [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Post date:** [May 5, 2021, 10:06pm UTC](https://community.deeplearning.ai/t/updating-tensorflow/3508/2 "2021-05-05T22:06:43Z")

</div>

Pip installations work best for me.

---

<div class="post-metadata">

**Author:** ![Mubsi](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mubsi/32/94983_2.png) [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Post date:** [May 5, 2021, 10:08pm UTC](https://community.deeplearning.ai/t/updating-tensorflow/3508/3 "2021-05-05T22:08:21Z")

</div>

And since we use tensorflow 2.3, I’d recommend you install that particular version.

---

<div class="post-metadata">

**Author:** ![EduardoChicago](https://avatars.discourse-cdn.com/v4/letter/e/9dc877/32.png) [@EduardoChicago](https://community.deeplearning.ai/u/EduardoChicago)\
**Post date:** [May 5, 2021, 10:13pm UTC](https://community.deeplearning.ai/t/updating-tensorflow/3508/4 "2021-05-05T22:13:37Z")

</div>

the command I know is

> PIP upgrade tensorflow

will that do it? Is there a way to tell PIP to install a specific version?  
thanks Mubsi

---

<div class="post-metadata">

**Author:** ![Mubsi](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/mubsi/32/94983_2.png) [@Mubsi](https://community.deeplearning.ai/u/Mubsi)\
**Post date:** [May 5, 2021, 10:45pm UTC](https://community.deeplearning.ai/t/updating-tensorflow/3508/5 "2021-05-05T22:45:57Z")

</div>

@EduardoChicago, the command on your terminal would be

pip install tensorflow==2.3.0
