I want to load a module/file called lr_utils inside folder "Deep Learning".
I am relatively new to Python and PyCharm. In my other languages, I just change the directory, and load the package. But, that does not work in PyCharm.
import os
> os.chdir("/Users/Desktop/Deep Learning")
> os.getcwd()
'/Users/Desktop/Deep Learning'
The directory is changed. Let's import.
from lr_utils import load_dataset
Now, I get this error message:
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/Applications/PyCharm CE.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 20, in do_import
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'lr_utils'
I've been reading that you can go to PyCharm interpreter and manually add the path. But that's too tedious! What If I have multiple paths? What if I want to send me a code? What if I switch to different computer?
Bottom line: I just want to change directory on the fly.