ImportError persists after installing all requirements

Looks like replying to an old thread does not do any good. No reply. So, I’ll start a new one.
In a previous query, it was suggested to pip install -r requirements.txt but that resulted in a huge, multicolored error message. I compensated by manually installing them one by one.

And after manually installing everything, I still get ImportError:

What is still missing? The ImportError is for an item that was not in the list of requirements. Will I have to keep getting these errors and installing whatever is stated in the error message, or is there a simpler solution?

Hey @Jason_Hernandez,

Kindly let us know which python version you are using. The course has been tested with Python 3.8 and if you are using a new or earlier version, there might be issues since sometimes the packages get deprecated.

Also, you are using anaconda, right? I am suggesting an alternative way to launch the environment which many other learners find better in Anaconda.
To know which packages/libraries are installed in your environment, kindly open your Anaconda Navigator and head over to Environments. Here you should see mflix if its been successfully created:

Once you are certain that all packages are installed, kindly head over to Home and select mflix from the dropdown, and then for Jupyter Notebook, click launch:

This should launch the jupyter notebook for the mflix environment. Kindly start the terminal from the jupyter, and before you actually run pytest, kindly make sure to run your app as well in one terminal. Let us know if running the app gives an error or if it starts. It should look like this for no error:

Also, kindly make sure that you have modified your .ini file as per instructions.

Let us know if there’s any confusion in anything. Do send the screenshot of the terminal after running the app as well as of your .ini file in the reply if the problem persists.


Sorry for the long delay; I was traveling last week. I am not sure which of the many entities on my computer named Python is the one you are referring to, but based on the search results in the screenshot, it appears that I may be using 3.9.7

I am having some difficulty with Anaconda Navigator. I will get back to you on that when it is resolved.

So it appears that I didn’t sign up for Navigator when I installed Anaconda. If I sign up now, will I be able to link it to my existing installation? I really would rather not go through the whole process again.

Hey @Jason_Hernandez,

No need to sign up. Can you just check and see if your environment is created properly in anaconda(steps given in my previous reply in this post) and is of python 3.8? If both of these are true, you should be good to go. :smile:


1 Like

None of them are installed:

And when I look for them in the list of uninstalled packages, they don’t all seem to be there either – here is the search for the first one, appnope:

Likewise, there is no pytest-flask. The rest, I was able to find and install.

Unfortunately, it still does not work. Here is the result from Jupyter:

And here is the result for the Anaconda Prompt:

Hey @Jason_Hernandez,

Before running python, did you do a pip install -r requirments.txt as given in the lab instructions? I don’t see that step in your screenshot 3. This would have installed all the packages.
One more thing, in your fourth screenshot, it doesn’t look like you activated the mflix environment first before running python Did you activate it in jupyter as well before running the app?

Also, you are using python 3.8, correct? If not using python 3.8 and the above also didn’t help, then it would be advisable to set up with python 3.8.

Also, let me know if doing this helps or not. It’s from the same thread that I linked previously and has a similar error like you:


That was addressed in the very first post:

Basically, the premise of the thread.


One thing we forgot to check is making sure that the correct python version/paths are set. Are there multiple versions of python on your windows? If yes, please make sure that the correct version is being in use and the path is set correctly(Steps to set the path are mentioned in the lab).

This should let you know the current python version in cmd/powershell/Anaconda prompt:

python -V

This should list down your python paths:

where python

To see if you have set the right path while setting up mflix, follow finding your anaconda path.