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 'packaging' #737

Closed
Licini opened this issue Oct 18, 2020 · 4 comments · Fixed by #856
Closed

ModuleNotFoundError: No module named 'packaging' #737

Licini opened this issue Oct 18, 2020 · 4 comments · Fixed by #856
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Licini
Copy link

Licini commented Oct 18, 2020

Your issue may already be reported!
Please search on the issue tracker before creating one.

Context

  • torchserve version: 0.2.1
  • torch version: 1.6.0
  • Operating System and version: Ubuntu 20.04 with Conda python3.8

Your Environment

  • Installed using source? [yes/no]: No
  • Are you planning to deploy it using docker container? [yes/no]: Yes
  • Is it a CPU or GPU environment?: GPU
  • Using a default/custom handler? [If possible upload/share custom handler/model]: Object_Detector
  • What kind of model is it e.g. vision, text, audio?: Vision, MaskRCNN/FastRCNN

Current Behavior

Models using Object_Detector not able to load. Error log suggesting ModuleNotFoundError: No module named 'packaging'

Possible Solution

pip install packaging solved the issue. Please consider adding it to dependencies

Failure Logs [if any]

ts_log copy.log

@harshbafna harshbafna self-assigned this Oct 19, 2020
@harshbafna
Copy link
Contributor

harshbafna commented Oct 19, 2020

@Licini: The TorchServe version reported by you is 0.2.1 and the same can be seen in the provided logs as well. However, the official latest version of TorchServe is 0.2.0 only. Is this some custom implementation of TorchServe that you are using?

The packaging module used in object_detector default handler is already a part of TorchServe dependency defined in setup.py

@harshbafna harshbafna added the triaged_wait Waiting for the Reporter's resp label Oct 19, 2020
@Licini
Copy link
Author

Licini commented Oct 19, 2020

@Licini: The TorchServe version reported by you is 0.2.1 and the same can be seen in the provided logs as well. However, the official latest version of TorchServe is 0.2.0 only. Is this some custom implementation of TorchServe that you are using?

The packaging module used in object_detector default handler is already a part of TorchServe dependency defined in setup.py

@harshbafna Thanks for the quick reply, I used conda install torchserve. It is mysteriously one version ahead ...
https://anaconda.org/pytorch/torchserve

@harshbafna
Copy link
Contributor

@Licini: Thanks for the update on the steps used for installation. I will try and reproduce this at my end and revert.

@harshbafna harshbafna removed the triaged_wait Waiting for the Reporter's resp label Oct 19, 2020
@harshbafna
Copy link
Contributor

@Licini: Thanks for reporting this. I can confirm this is a bug with the conda binary and the packaging module does not get installed as part of TorchServe dependency. We will fix this in the next release.

@harshbafna harshbafna added the bug Something isn't working label Oct 19, 2020
@harshbafna harshbafna added this to the v0.3.0 milestone Oct 19, 2020
@maaquib maaquib added this to To do in TorchServe v0.3.0 Issues Lifecycle via automation Oct 20, 2020
@lokeshgupta1975 lokeshgupta1975 moved this from To do to In progress in TorchServe v0.3.0 Issues Lifecycle Dec 10, 2020
TorchServe v0.3.0 Issues Lifecycle automation moved this from In progress to Done Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants