poetry
poetry copied to clipboard
Why does running jupyter notebook use different python?
I try to import something from my project inside notebook.
And I unexpectedly got an error ModuleNotFoundError: No module named 'amr'
My poetry env info is
Virtualenv
Python: 3.8.13
Implementation: CPython
Path: /home/krupenina/anaconda3/envs/amr
Valid: True
System
Platform: linux
OS: posix
Python: /home/krupenina/anaconda3/envs/amr
But when I run jupyter notebook poetry run jupyter notebook and tried to check the python version I got
/home/krupenina/anaconda3/bin/python.
I tried to use poetry shell but I got the same result.
The project structure is
.
├── amr
│ ├── __init__.py
│ └── ...
├── amr_config.yaml
├── data
│ ├── ...
├── install_nltk_dependencies.py
├── notebooks
│ ├── ...
├── poetry.lock
├── pyproject.toml
└──README.md
Why does it happen? And what is the way to change that? Only use kernels or change python manually?