comet-ml / issue-tracking

Questions, Help, and Issues for Comet ML
https://www.comet.ml
85 stars 7 forks source link

No module named 'imp' #545

Closed Les1ie closed 4 months ago

Les1ie commented 4 months ago

Describe the Bug

No module named 'imp'

Expected behavior

Just run it.

Where is the issue?

To Reproduce

Platform: Python 3.12.2 on Windows. comet_ml: comet_ml/noarch::comet_ml-3.1.4-py_0

Stack Trace

If possible please include the full stack trace of your issue here

python /Workspace/demo/Pytorch_light_example.py
Traceback (most recent call last):
  File "e:\Workspace\demo\Pytorch_light_example.py", line 17, in <module>
    import comet_ml
  File "C:\Users\DELL\.conda\envs\pyg_cpu\Lib\site-packages\comet_ml\__init__.py", line 62, in <module>
    from .monkey_patching import CometModuleFinder
  File "C:\Users\DELL\.conda\envs\pyg_cpu\Lib\site-packages\comet_ml\monkey_patching.py", line 19, in <module>
    import imp
ModuleNotFoundError: No module named 'imp'
jverre commented 4 months ago

Hi @Les1ie , It seems like you are using an old version of the Python SDK (3.1.4) that was released in 2020. Can you try updating the SDK to the lastest version (3.42.0) ?

Les1ie commented 4 months ago

Oh, I installed SDK directly using Conda, and I will try to update the SDK version.

Hi @Les1ie , It seems like you are using an old version of the Python SDK (3.1.4) that was released in 2020. Can you try updating the SDK to the lastest version (3.42.0) ?

Les1ie commented 4 months ago

@jverre It seems that comte_ml has not released a version suitable for Python 3.12 on Conda.

When run conda install comet_ml==3.42 -c comet_ml, the output is as follows:

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package comet_ml-3.42.0-py310 requires python 3.10.*, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ comet_ml 3.42  is installable with the potential options
│  ├─ comet_ml 3.42.0 would require
│  │  └─ python 3.10.* , which can be installed;
│  ├─ comet_ml 3.42.0 would require
│  │  └─ python 3.11.* , which can be installed;
│  ├─ comet_ml 3.42.0 would require
│  │  └─ python 3.6.* , which can be installed;
│  ├─ comet_ml 3.42.0 would require
│  │  └─ python 3.7.* , which can be installed;
│  ├─ comet_ml 3.42.0 would require
│  │  └─ python 3.8.* , which can be installed;
│  └─ comet_ml 3.42.0 would require
│     └─ python 3.9.* , which can be installed;
└─ pin-1 is not installable because it requires
   └─ python 3.12.* , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.12.* (labeled as 'pin-1')

At the same time, I did not see any files suitable for py312 on https://anaconda.org/comet_ml/comet_ml/files.

dsblank commented 4 months ago

@Les1ie , indeed, we don't have a conda version ready for Python 3.12 yet. In the meantime, you should be able to get by with "pip install comet_ml". Or, alternatively, use Python 3.11.

dsblank commented 4 months ago

Reported internally as CM-10385.

Lothiraldan commented 4 months ago

@Les1ie Hello, we just released the version 3.42.1 of the SDK with a conda package for Python 3.12

Les1ie commented 4 months ago

That's great.

dsblank commented 4 months ago

Thanks for reporting @Les1ie ! Closing this ticket, but let us know if you have any questions.