I cloned my teammate’s git repo, but when I run dvc repro
, I get an error saying that there is no module named pandas.
project_path (main)
$ dvc repro
Running stage 'data_collection':
> python3 -m src.stages.data_collection--config=params.yaml
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "project_pathsrcstagesdata_collection.py", line 1, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
ERROR: failed to reproduce 'data_collection': failed to run: python3 -m src.stages.data_collection --config=params.yaml, exited with 1
I ran poetry update successfully, read the pyproject.toml and poetry.lock files to check the package versions, I ran:
$ pip show pandas
Name: pandas
Version: 2.0.0
I ran .ipynb files directly with no issue either, which import the pandas module.
Interestingly, running poetry install triggers the following error:
$ poetry install
Installing dependencies from lock file
No dependencies to install or update
Installing the current project: project_name (version_n)
Warning: The current project could not be installed: No file/folder found for package package_name
If you do not want to install the current project use --no-root.
If you want to use Poetry only for dependency management but not for packaging, you can disable package mode by setting package-mode = false in your pyproject.toml file.
In a future version of Poetry this warning will become an error!
I have tried deleting the repo and cloning it again, but i have the same issue. I walked through the issue with the package owner and they do not have the issue.
- Perhaps I need to resolve the poetry install warning, not sure how
- Perhaps I have setup VSCode wrong? I am definitely using the right poetry env:
$ poetry env info
Virtualenv
Python: 3.11.1
Implementation: CPython
Path: path
Executable: path to exe
Valid: True
Any help is appreciated, I am being onboarded to this dev workflow.