Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'mdistiller' #55

Open
kennysH opened this issue Dec 8, 2023 · 5 comments
Open

ModuleNotFoundError: No module named 'mdistiller' #55

kennysH opened this issue Dec 8, 2023 · 5 comments

Comments

@kennysH
Copy link

kennysH commented Dec 8, 2023

I encountered an error when running train.py after following the steps provided in the README for installation. The error message I received is: “Traceback (most recent call last): File "tools/train.py", line 9, in from mdistiller.models import cifar_model_dict, imagenet_model_dict, tiny_imagenet_model_dict ModuleNotFoundError: No module named 'mdistiller'.”

However, I can navigate to 'mdistiller.models' correctly in my IDE. Can you please tell me what might be the reason for this issue?"

@kennysH
Copy link
Author

kennysH commented Dec 8, 2023

I noticed that after executing 'sudo python3 setup.py develop,' the path was not added to sys.path

@JinYu1998
Copy link

I noticed that after executing 'sudo python3 setup.py develop,' the path was not added to sys.path

I had the same problem, and here's how I solved it.
sudo pip install YOUR_Mdistiller_Path -t YOUR/Conda/env/lib/pythonX.X/site-packages

and I modiyf the train.py's pretrain_model_path to The real location of my teacher model !!!

I hope this helps, this problem took me an hour to solve.

@kennysH
Copy link
Author

kennysH commented Jan 2, 2024

I noticed that after executing 'sudo python3 setup.py develop,' the path was not added to sys.path

I had the same problem, and here's how I solved it. sudo pip install YOUR_Mdistiller_Path -t YOUR/Conda/env/lib/pythonX.X/site-packages

and I modiyf the train.py's pretrain_model_path to The real location of my teacher model !!!

I hope this helps, this problem took me an hour to solve.

thank you a lot! The solution worked for me too!

@genglufneg
Copy link

I noticed that after executing 'sudo python3 setup.py develop,' the path was not added to sys.path

I had the same problem, and here's how I solved it. sudo pip install YOUR_Mdistiller_Path -t YOUR/Conda/env/lib/pythonX.X/site-packages

and I modiyf the train.py's pretrain_model_path to The real location of my teacher model !!!

I hope this helps, this problem took me an hour to solve.

Hello, I have the same question, but I have been trained on colab and I can't understand your answer. Could you tell me more details

@JinYu1998
Copy link

I noticed that after executing 'sudo python3 setup.py develop,' the path was not added to sys.path

I had the same problem, and here's how I solved it. sudo pip install YOUR_Mdistiller_Path -t YOUR/Conda/env/lib/pythonX.X/site-packages
and I modiyf the train.py's pretrain_model_path to The real location of my teacher model !!!
I hope this helps, this problem took me an hour to solve.

Hello, I have the same question, but I have been trained on colab and I can't understand your answer. Could you tell me more details

Hello, There 2 ways to slove the problem.

  1. Please read my previous reply carefully, I believe this approach is helpful.
  2. You can use a previous version of the code by running git checkout 7bb7dd670f3ee3dd2500b89a8bb4c52c2a2df425 and sudo python3 setup.py develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants