You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.10.4 | packaged by conda-forge | (main, Mar 30 2022, 08:38:02) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pytorch_lightning as pl
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ProgramData\Anaconda3\envs\dl\lib\site-packages\pytorch_lightning\__init__.py", line 53, in <module>
from pytorch_lightning.core import LightningModule, data_loader
File "C:\ProgramData\Anaconda3\envs\dl\lib\site-packages\pytorch_lightning\core\__init__.py", line 339, in <module>
from pytorch_lightning.core.decorators import data_loader
File "C:\ProgramData\Anaconda3\envs\dl\lib\site-packages\pytorch_lightning\core\decorators.py", line 6, in <module>
from pytorch_lightning.core.lightning import LightningModule
File "C:\ProgramData\Anaconda3\envs\dl\lib\site-packages\pytorch_lightning\core\lightning.py", line 19, in <module>
from pytorch_lightning.core.hooks import ModelHooks
File "C:\ProgramData\Anaconda3\envs\dl\lib\site-packages\pytorch_lightning\core\hooks.py", line 7, in <module>
from pytorch_lightning.utilities import move_data_to_device, NATIVE_AMP_AVALAIBLE
File "C:\ProgramData\Anaconda3\envs\dl\lib\site-packages\pytorch_lightning\utilities\__init__.py", line 7, in <module>
from pytorch_lightning.utilities.apply_func import move_data_to_device
File "C:\ProgramData\Anaconda3\envs\dl\lib\site-packages\pytorch_lightning\utilities\apply_func.py", line 2, in <module>
from collections import Mapping, Sequence
ImportError: cannot import name 'Mapping' from 'collections' (C:\ProgramData\Anaconda3\envs\dl\lib\collections\__init__.py)
Expected behavior
When importing pl the ImportError raised
PyTorch Lightning Version: 0.8.5
Python version: 3.10.4
OS: Windows 10
The text was updated successfully, but these errors were encountered:
@dobrik4ever The version of PyTorch Lightning you're using seems very old. Would you mind updating to the stable release by running pip install pytorch-lightning -U and trying it again? Let me know if it resolves this issue.
Please note that, as of now, we are not testing PyTorch Lightning with Python 3.10, but if the problem still persists, it'll be addressed via #9980.
We no longer have this import statement in the code base. It was changed in #2746 so this should be resolved. As @akihironitta said, the solution is to update lightning to a recent version or to downgrade Python to an older version. I don't see any direct relationship to Python 3.10 incompatibility otherwise.
🐛 Bug
On python 3.10.4 got a following error:
To Reproduce
Expected behavior
When importing pl the ImportError raised
The text was updated successfully, but these errors were encountered: