dbsystel/yolov5-coreml-tools

poetry run coreml-export error

Closed this issue · 4 comments

When run poetry run coreml-export, it shows me ModuleNotFoundError: No module named 'coreml_export'. How should I fix this issue?

Do you run the command from the root project directory? What version of poetry are you using?

Yes, I run it from the yolov5-coreml-tools root directory. I install poetry with conda enviroment
conda install poetry

poetry version 1.1.6
python version 3.8.6

Did you run a poetry install sucessfully before? It's not only needed to install dependencies, but also the project itself so that the modules are available.

Other than that I have no idea what the cause could be. Maybe try to run the code manually. You can use poetry run to run any command in the virtual env including python.
So try poetry run python3 src/coreml_export/main.py instead.

Edit: Maybe it's also a problem with conda. I'm no expert here, but conda uses it's own virtual environment afaik. And as poetry creates a virtual env as well that might cause problems. But that's really just a blind guess.

Thanks for your suggestion, I found my computer did not run poetry install success because the downloading is really slow. After I add mirror url [[too.poetry.souce]] in pyproject.toml. This issue has been fixed.