Closed laurenzlevi closed 4 months ago
We don't support 3.12 atm but that will be the case for the next major release I think!
Ah okay I´ll be using 3.11
then for now, is there any approximate release window for the next major version and should I close the issue or leave it open for others to see?
I am also curious if there are any (approximate) plans for a new major (or even minor) release?
I'm behind schedule for the 0.3.2 minor because the CI was giving me some issues and I couldn't guarantee that the wheels were working fine. I will try to release it shortly!
0.4 will be there soon (PyTorch release day is tomorrow, expect the v0.4 release in the days after)
For me, tensordict
0.4.0 is still broken for python 3.12 as it relies on the now deprecated distutils
package:
RuntimeError: First class dim doesn't work with python 3.12
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/nix/store/v9avkh4lq80zm23sjrr5jfk0f06xhgpx-python3.12-tensordict-0.4.0/lib/python3.12/site-packages/tensordict/_lazy.py", line 26, in <module>
from functorch import dim as ftdim
File "/nix/store/pn0xqrvfqf7cri031497b7y3nprfjyx7-python3.12-torch-2.2.2/lib/python3.12/site-packages/functorch/dim/__init__.py", line 7, in <module>
import functorch._C
ImportError: initialization failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 1, in <lambda>
File "/nix/store/aav6i2sih47qjwz0shpl4mmpp877v16k-python3-3.12.3/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/nix/store/v9avkh4lq80zm23sjrr5jfk0f06xhgpx-python3.12-tensordict-0.4.0/lib/python3.12/site-packages/tensordict/__init__.py", line 6, in <module>
from tensordict._lazy import LazyStackedTensorDict
File "/nix/store/v9avkh4lq80zm23sjrr5jfk0f06xhgpx-python3.12-tensordict-0.4.0/lib/python3.12/site-packages/tensordict/_lazy.py", line 30, in <module>
from tensordict.utils import _ftdim_mock as ftdim
File "/nix/store/v9avkh4lq80zm23sjrr5jfk0f06xhgpx-python3.12-tensordict-0.4.0/lib/python3.12/site-packages/tensordict/utils.py", line 22, in <module>
from distutils.util import strtobool
ModuleNotFoundError: No module named 'distutils'
Same 3.12 issue I'm afraid! I will work on making a release for 3.12 for 0.4.1, but no promises! Please bear with me on this one!
Sure no worry. I just wanted to ensure that you knew it was still broken.
Best of luck with that :)
Related issue here. I see that since v0.4.0
all macOS x86 builds are removed and I have to build wheels from source. May I ask why macOS x86 is no longer supported? Thanks :)
This saddens me too very much, but the latest pytorch release (2.3) doesn't support x86 anymore so there was no way for us to release v0.4 for these platforms :( https://github.com/pytorch/pytorch/releases/tag/v2.2.0 So sorry about that! This one's way beyond my control
No worries. One more reason to update my old laptop ;)
Hey there, I wanted to chime back in on this issue because I'm failing to import with the same distutils error message on Python 3.12 / torchrl 0.6.0 on linux_x86-64.
EDIT: after digging into this a bit more, it seems that somehow my environment (using pixi
as my package manager) had gotten borked and a pixi clean
followed by pixi install
was enough to get import distutils
working again (provided through setuptools
)
Describe the bug
Unable to install torchrl via pip for python312.
To Reproduce
Fresh install of
python 3.12
, runningpip install torchrl
triggers the error mentioned above.Installing via
pip install git+https://github.com/pytorch/rl.git
gives the error messageInstalling
tensordict
viapip install git+https://github.com/pytorch-labs/tensordict
works and allows for a subsequent installation oftorchrl
viapip install git+https://github.com/pytorch/rl.git
, but using the module leads to the following errorExpected behavior
torchrl
should install.System info
Describe the characteristic of your environment:
pip
and`git+https
Tensordict 0.4.0+b4c91e8
(installed viapip install git+https://github.com/pytorch-labs/tensordict
, becausepip install tensordict
installs versiontensordict-0.1.2
buttorchrl
requirestensordict>=0.4.0
)torch 2.2.1+cu121
(works flawlessly)System information:
sys.__version
: 3.12.2 (tags/v3.12.2:6abddd9, Feb 6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)]release 12.3, V12.3.103
Checklist