I am following the instructions as is mentioned in Module 3: Dependency Management Solving Versioning and Dependency conflicts with an LLM assignment. When I open terminal and entered the conda command to activate the environment, getting error as “command not found”
Conda activate assignment bash: conda: command not found
Hi,
I just tried to replicate the issue you are facing. It is working as expected. Please check the following things, it might help:
- You need to open the terminal from the Jupyter Lab environment. Hope you’re not mistaken with the terminal that comes with your OS. (If you are confused about where to find the terminal, open a new tab (new launcher) by clicking on the
+button in your Jupyter Lab environment, and as you scroll down on the new launcher, you can find the terminal.) - Make sure that you are inside the right working directory (e.g. assignment_part_1). You can use
pwdcommand to check this. - Now follow the instructions and check the current python version, and follow up with activating the python2.7 environment by using the given command. (Check the attached image too)
Hope this helps.
Regards,
Sharon
Thanks for the quick response. I am following the exact instructions. I am in working folder only, still getting same error.
I can see the difference in the terminal prompt: it shows “joyvan@ip…” in my environment, but in the screenshot it shows “joyvan@73a..”. Does it cause any issues?
Hi,
It looks like you are not in the assignment environment (conda) from the screenshot of your prompt. (See (assignment)mentioned at the start of my prompt, indicating that I am inside the assignment environment, while it is evidently missing from your prompt.) I am not sure how exactly this has happened. However, can you try starting from scratch before we try to do anything else? Please follow this link to refresh your workspace. Please let us know if the issue persists after you’ve tried it.
Regards
I am on the DL.AI platform. The link provided to refresh the workspace is taking me to the Coursera website. On the other hand, I tried to reset the workspace, including deleting and recreating it. The same issue persists, preventing me from completing the certification.
Sorry to hear that. Could you check for conda –version and if there is conda installed, check conda env listfrom your terminal? If there is an environment named “assignment”, activate it by conda activate assignmentand go on with the rest of the assignment. If you are still stuck with the issue, please let me know.
In the meantime, @lucas.coutinho could you help us to find a resolution to this issue? The student is facing this issue in the DL.AI platform fyi and unable to start/ complete the GENAI4SD C2 M3 Lab.
Thanks & Regards
Hi @abhinav_neo,
Happy New Year!
I had the same problem yesterday. Here is how I solved the problem by creating a virtual environment:
In the terminal, inside the directory of the assignment, run the following commands:
$ python -m venv .venv
$ source .venv/bin/activate
(.venv) $ pip install -r requirements.txt
You now have a virtual environment with the packages in `requirements.txt`.
Go ahead from here.
Best regards.
Hi @mingote,
I am facing the same problem. I tried the steps you mentioned above, inside ~/work/assignment_part_1, but requirements.txt doesn’t exist there. So I deactivated the virtual environment under that assignment folder, navigated to ~/work/assignment_part_2 and ran your steps. They ran fine, but I cannot still run “conda activate assignment”. It still says conda not found.
I have also tried the following:
- Restarted Jupyter Lab
- Restarted the Kernel
- Refreshed the browser tab for the coursework
None have worked.
I am also now stuck and cannot work on the assignment. I should mention, I am NOT on the DL.AI Learning Platform. Any help will be appreciated!
Hi @achatter01,
In part 1 there is mention of two environments, but I couldn’t even find Python’s 2.7 executable (I’m on DeepLearning.ai).
I could run `magic_summation.py` without a virtual environment without problems. I suggest you run `magic_summation_python27.py` and ask the LLM to help you fix the errors until you can run it without errors. All this without a virtual environment.
The first two lines I suggested are meant to create and activate the environment, exactly because `conda` doesn’t exist in the environment. I used Python, instead of Conda, to create de virtual environment.
Best Regards.
Yes, I couldn’t find Python’s 2.7 version either. It is automatically launching with the kernel with Python 3. Also as I mentioned requirements.txt is only in assignment 2 not 1. Even running that didn’t let me activate Python 2.7 via Conda as Conda is still not available.
I will try what you suggested. Thanks!
I’m also stuck here, exactly the same as the others. I even downloaded and installed Miniconda3, but there are no environment called assignment… (obviously). Something is missing in these distributions. I worked around assignment 1, but couldn’t find my way out with assignment 2 (no LLM was of help, circular solutions)
Are you trying to do these assignments locally?
No, just like the other comment, running it from the deeplearning.ai web site.
I don’t have access to the DLAI platform courses, maybe @chris.favila can help! Also, Chris, if I can have access to the same courses I have access in Coursera, it would be great!
Hi Gent. Unfortunately, I don’t handle this course. Tagging @lucas.coutinho here for advice.
Sorry I forgot again!

