# Practice lab C3W3 not working locally - many dependencies issues

**URL:** <https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997>\
**Category:** Unsupervised Learning, Recommenders, Reinforcement\
**Tags:** week-module-3\
**Created:** [March 23, 2024, 3:29pm UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997 "2024-03-23T15:29:06Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francis60](https://avatars.discourse-cdn.com/v4/letter/f/e95f7d/32.png) [@Francis60](https://community.deeplearning.ai/u/Francis60)\
**Post date:** [March 23, 2024, 3:29pm UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/1 "2024-03-23T15:29:06Z")

</div>

I am trying to get the lab to work locally and run into dependencies problems.

Please, can you provide guidance.

Francis

* * *

- Link to the classroom item you are referring to: [https://www.coursera.org/learn/unsupervised-learning-recommenders-reinforcement-learning/programming/q5vKI/reinforcement-learning](https://C3_W3_reinforcement-learning)

* * *

What I tried getting mad:

```
    My projects on vscode didn't work well (on a poetry environment)
    I noticed tensorflow requires python 3.9 and Gym is only installable using conda so i created a conda virtual environment with Python 3.9.18
    
    I read this post [https://community.deeplearning.ai/t/error-on-jupyter-lab/24052](https://error-on-jup) so created a new venv Python 3.7.16
    
    I started reinstalling all and checked all installed versions on online Labs.
    [In]

```

> ```
> import pandas as pd
> pd. __version__
> 
> ```

```
    [Out]

```

> ```
> '1.0.3'
> 
> ```

To work on the reinforcement learning lab locally, you will need to have the following specific versions of Python and the mentioned libraries installed:

```
    Python Version: Python 3.7 or higher
    
    Library Versions:
    
        OpenAI Gym: Version 0.18.0
        NumPy: Version 1.21.2
        Matplotlib: Version 3.4.3
        TensorFlow: Version 2.6.0
        Keras: Version 2.6.0
    
    
    conda activate course_3_7
    (course_3_7) me@me:~$ conda install pandas==1.0.3
    '1.18.4'
    
    conda install ipykernel
    pip install gym==0.24.0
    
    pip install Pillow==7.1.2
    conda install tensorflow==2.1.0 > issues
    
    DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`.
    
    Warning: Gym version v0.24.0 has a number of critical issues with `gym.make` such that the `reset` and `step` functions are called before returning the environment. It is recommend to downgrading to v0.23.1 or upgrading to v0.25.1
    
    pip install gym==0.23.1
    pip install imageio (Ok)
    
    pip install pyvirtualdisplay==3.0
    
    sudo apt-get install xvfb
    No module named 'tensorflow_core.estimator'

    conda install -c conda-forge matplotlib

```

… then I stopped try to make it work by myself and asked you for your help.

* * *

My machine:  
Debian12 with this GPU: VGA compatible controller: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] (rev a1)  
On my system root python is Python 3.11.2  
Architecture : x86\_64  
Processor(s) : 16  
Identifiant constructeur : AuthenticAMD  
Nom de modèle : AMD Ryzen 7 5800H with Radeon Graphi

---

<div class="post-metadata">

**Author:** ![Nevermnd](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/nevermnd/32/126021_2.png) [@Nevermnd](https://community.deeplearning.ai/u/Nevermnd)\
**Post date:** [March 23, 2024, 6:26pm UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/2 "2024-03-23T18:26:09Z")

</div>

Start by installing Anaconda for Linux:

> **[Free Download | Anaconda](https://www.anaconda.com/download)**
>
> Anaconda's open-source Distribution is the easiest way to perform Python/R data science and machine learning on a single machine.

That should cover most of the dependencies, unless you are referring to support (.py) files.

---

<div class="post-metadata">

**Author:** ![Francis60](https://avatars.discourse-cdn.com/v4/letter/f/e95f7d/32.png) [@Francis60](https://community.deeplearning.ai/u/Francis60)\
**Post date:** [March 24, 2024, 8:06am UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/3 "2024-03-24T08:06:16Z")

</div>

Hello Nevermnd,  
I have just installed anaconda-navigator right now.

Created an environment with python 3.7 but cannot install gym 0.24.0 using  
anaconda.  
gymnasium 0.28.1 requires python \>=3.9

* * *

Anaconda installation required 9GB of memory, plus an additional 4GB for the virtual environment and didn’t resolve the problem of ‘gym’ obsolescence.

I had to open the hood and dirty my hands but eventually I got it working.

Francis

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [March 24, 2024, 2:47pm UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/4 "2024-03-24T14:47:27Z")

</div>

Gym is a problem, as it is no longer supported.

Search online for its status, there is a successor package.

---

<div class="post-metadata">

**Author:** ![Francis60](https://avatars.discourse-cdn.com/v4/letter/f/e95f7d/32.png) [@Francis60](https://community.deeplearning.ai/u/Francis60)\
**Post date:** [March 24, 2024, 3:34pm UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/5 "2024-03-24T15:34:37Z")

</div>

Yes TMosh thank you 😄

Special thanks to Dibya Chakravorty. With his help, I successfully navigated through the issue and safely landed my moon lander. Hooray!  
Youtube link [[https://www.youtube.com/watch?v=e3DyCg0fgx0](https://www.youtube.com/watch?v=e3DyCg0fgx0)](https:// Dibya Chakravorty)

Before I forget, another tricky issue:

> # Set the random seed for TensorFlow  
> # tf.random.set\_seed(utils.SEED)  
> # tf.random.set\_random\_seed(utils.SEED) deprecated at home  
> tf.compat.v1.random.set\_random\_seed(utils.SEED) # use this instead

If you are interested in getting the lab working at home, you can ask me for details.

Francis

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [March 25, 2024, 4:28am UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/6 "2024-03-25T04:28:09Z")

</div>

Great news!

---

<div class="post-metadata">

**Author:** ![Ganesh.Rao](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Ganesh.Rao](https://community.deeplearning.ai/u/Ganesh.Rao)\
**Post date:** [September 15, 2024, 4:07pm UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/7 "2024-09-15T16:07:07Z")

</div>

Ironic that for the coursera course we had to rely on Youtube videos.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [September 16, 2024, 1:09am UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/8 "2024-09-16T01:09:39Z")

</div>

Running the labs locally is up to each student to accomplish as extra effort.

---

<div class="post-metadata">

**Author:** ![Ganesh.Rao](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Ganesh.Rao](https://community.deeplearning.ai/u/Ganesh.Rao)\
**Post date:** [September 16, 2024, 2:00am UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/9 "2024-09-16T02:00:16Z")

</div>

I beg to disagree on this. Running the lab locally is where the real learning happens. The coursera lab is spoonfeeding. It aint learning I am afraid.  
I am sorry to say that students solely relying on coursera will fail to handle projects in real life. You must take hte courses to the next level, else i would suggest switching to another elearning platform like OReilly which encourages local replay.

---

<div class="post-metadata">

**Author:** ![Ganesh.Rao](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Ganesh.Rao](https://community.deeplearning.ai/u/Ganesh.Rao)\
**Post date:** [September 16, 2024, 2:17am UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/10 "2024-09-16T02:17:43Z")

</div>

Francis60 could you share me your email to contact you for helping me run this lab locally.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [September 16, 2024, 2:53am UTC](https://community.deeplearning.ai/t/practice-lab-c3w3-not-working-locally-many-dependencies-issues/596997/11 "2024-09-16T02:53:41Z")

</div>

Thanks for your observation. It is an interesting point.
