Packages imported in my conda environment are not available in Jupyter notebook started from that location.
I'm not sure if my steps are right, or am I missing anything
- Creaed a folder structure for my work, and cd into my folder
- I created conda environment with the list of packages I want
conda create -n practice1env scipy opencv
- Activated the environment
source activate practice1env
- Cloned my GitHub repo
git clone https://xxx
Note that this contains jupyter notebooks - opened a notebook file from my clone, and trying to edit it
When I work with numpy functions, it doesn't give me any trouble. But when i'm trying to import cv2
it says
ModuleNotFoundError: No Module named 'cv2'
One thing to note here is that - when i executed some commands, I got to know that the conda environments are in folder /anaconda/envs/practice1env
where as my working directory (where i cloned my git repo) is a different folder. Assuming this might be the issue, i even cloned my repo in the same anaconda env folder, but still, the issue remains the same.
Whereas when i type command import cv2
in the terminal where i created conda env, it is importing fine. But not in the notebook started from a folder either within it or a diff folder