-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Closed
Labels
Milestone
Description
First check
- I'm sure this is a bug.
- I've added a descriptive title to this bug.
- I've provided clear instructions on how to reproduce the bug.
- I've added a code sample.
- I've provided any other important info that is required.
Bug description
Pytorch lightning cannot be successfully imported after a fresh conda install due to a mismatch between tensorboard and distutils versions.
I tried going back through versions, and the latest it works on is 1.7.2.
How to reproduce the bug
Create a new conda environment using the following environment.yml:
name: pltest
channels:
- conda-forge
- defaults
dependencies:
- python
- pytorch-lightning=1.7.6Then try to import pytorch_lightning
Error messages and logs
>>> import pytorch_lightning
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ben/anaconda3/envs/pltest/lib/python3.10/site-packages/pytorch_lightning/__init__.py", line 34, in <module>
from pytorch_lightning.callbacks import Callback # noqa: E402
File "/home/ben/anaconda3/envs/pltest/lib/python3.10/site-packages/pytorch_lightning/callbacks/__init__.py", line 26, in <module>
from pytorch_lightning.callbacks.pruning import ModelPruning
File "/home/ben/anaconda3/envs/pltest/lib/python3.10/site-packages/pytorch_lightning/callbacks/pruning.py", line 30, in <module>
from pytorch_lightning.core.module import LightningModule
File "/home/ben/anaconda3/envs/pltest/lib/python3.10/site-packages/pytorch_lightning/core/__init__.py", line 16, in <module>
from pytorch_lightning.core.module import LightningModule
File "/home/ben/anaconda3/envs/pltest/lib/python3.10/site-packages/pytorch_lightning/core/module.py", line 41, in <module>
from pytorch_lightning.loggers import Logger, LoggerCollection
File "/home/ben/anaconda3/envs/pltest/lib/python3.10/site-packages/pytorch_lightning/loggers/__init__.py", line 23, in <module>
from pytorch_lightning.loggers.tensorboard import TensorBoardLogger
File "/home/ben/anaconda3/envs/pltest/lib/python3.10/site-packages/pytorch_lightning/loggers/tensorboard.py", line 26, in <module>
from torch.utils.tensorboard import SummaryWriter
File "/home/ben/anaconda3/envs/pltest/lib/python3.10/site-packages/torch/utils/tensorboard/__init__.py", line 4, in <module>
LooseVersion = distutils.version.LooseVersion
AttributeError: module 'distutils' has no attribute 'version'
Important info
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow): conda distribution
#- PyTorch Lightning Version (e.g., 1.5.0): 1.7.6
#- Lightning App Version (e.g., 0.5.2): N/A
#- PyTorch Version (e.g., 1.10): 1.10.2
#- Python version (e.g., 3.9): 3.10.6
#- OS (e.g., Linux): Linux (under WSL)
#- CUDA/cuDNN version: 11.7
#- GPU models and configuration: GTX 1650 Ti Max Q
#- How you installed Lightning(`conda`, `pip`, source): conda
#- Running environment of LightningApp (e.g. local, cloud): local
More info
No response
williamgilpin