apple / ml-cvnets

CVNets: A library for training computer vision networks
https://apple.github.io/ml-cvnets
Other
1.76k stars 225 forks source link

ModuleNotFoundError: No module named 'main_train' #94

Closed prsbsvrn closed 12 months ago

prsbsvrn commented 12 months ago

Hi I follow the installation part but I got this error "ModuleNotFoundError: No module named 'main_train'". I don't know how can I solve it. I would appreciate if someone answers my issue. This is contents of my cvnets-train:

import re
import sys
from main_train import main_worker
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(main_worker())
Sina-Najafi commented 12 months ago

Hi there! I hope you are doing ok. here is my solution: Write py_modules=["main_train", "main_eval", "main_conversion", "main_loss_landscape"], in setup.py before entry_points as an argument in the setup() function. and then run pip install --editable . to reinstall the package with these changes. Good Luck

prsbsvrn commented 12 months ago

Hi there! I hope you are doing ok. here is my solution: Write py_modules=["main_train", "main_eval", "main_conversion", "main_loss_landscape"], in setup.py before entry_points as an argument in the setup() function. and then run pip install --editable . to reinstall the package with these changes. Good Luck

Thank you