Hi everyone. I have a problem when I want to use the prepared code of the course in my Jupyter notebook on Anaconda navigator.
When I write this code:
from lab_utils_common import dlc
I confront with this error:
ModuleNotFoundError Traceback (most recent call last)
Input In [10], in <cell line: 1>()
----> 1 from lab_utils_common import dlc
ModuleNotFoundError: No module named ‘lab_utils_common’
I installed numpy, matplotlib.pyplot and tensorflow successfully.
How can I fix this problem?
Hey @Mohammad_Bananmah,
Welcome to the community. For resolving this error, you need to download all the files associated with an assignment. Please check out 08 of this thread.
Cheers,
Elemento
Thank you for your response, it was very helpful. I would really appreciate it if you tell me in what directory I should place the ‘deeplearning.mplstyle’ file to run the plt.style.use(‘./deeplearning.mplstyle’) command without any error.
Currently, this error appears when I run this command:
Thank you for your response, it was very helpful. I would really appreciate it if you tell me in what directory I should place the ‘deeplearning.mplstyle’ file to run the plt.style.use(‘./deeplearning.mplstyle’) command without any error.
Currently, this error appears when I run this command:
FileNotFoundError Traceback (most recent call last)
File ~\anaconda3\lib\site-packages\matplotlib\style\core.py:127, in use(style)
126 try:
--> 127 rc = rc_params_from_file(style, use_default_template=False)
128 _apply_style(rc)
File ~\anaconda3\lib\site-packages\matplotlib\__init__.py:854, in rc_params_from_file(fname, fail_on_error, use_default_template)
840 """
841 Construct a `RcParams` from file *fname*.
842
(...)
852 parameters specified in the file. (Useful for updating dicts.)
853 """
--> 854 config_from_file = _rc_params_in_file(fname, fail_on_error=fail_on_error)
856 if not use_default_template:
File ~\anaconda3\lib\site-packages\matplotlib\__init__.py:780, in _rc_params_in_file(fname, transform, fail_on_error)
779 rc_temp = {}
--> 780 with _open_file_or_url(fname) as fd:
781 try:
File ~\anaconda3\lib\contextlib.py:119, in _GeneratorContextManager.__enter__(self)
118 try:
--> 119 return next(self.gen)
120 except StopIteration:
File ~\anaconda3\lib\site-packages\matplotlib\__init__.py:757, in _open_file_or_url(fname)
756 encoding = "utf-8"
--> 757 with open(fname, encoding=encoding) as f:
758 yield f
FileNotFoundError: [Errno 2] No such file or directory: './deeplearning.mplstyle'
The above exception was the direct cause of the following exception:
OSError Traceback (most recent call last)
Input In [9], in <cell line: 1>()
----> 1 plt.style.use('./deeplearning.mplstyle')
File ~\anaconda3\lib\site-packages\matplotlib\style\core.py:130, in use(style)
128 _apply_style(rc)
129 except IOError as err:
--> 130 raise IOError(
131 "{!r} not found in the style library and input is not a "
132 "valid URL or path; see `style.available` for list of "
133 "available styles".format(style)) from err
OSError: './deeplearning.mplstyle' not found in the style library and input is not a valid URL or path; see `style.available` for list of available styles
1 Like
Hey @Mohammad_Bananmah,
Keep this file in the same directory as your jupyter notebook, and it should work. Let me know if this helps.
Cheers,
Elemento
Thank you so much. It worked 