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

[BUG]ImportError: DLL load failed while importing _torchrl #1637

Closed
3 tasks
HGGshiwo opened this issue Oct 21, 2023 · 2 comments
Closed
3 tasks

[BUG]ImportError: DLL load failed while importing _torchrl #1637

HGGshiwo opened this issue Oct 21, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@HGGshiwo
Copy link

Describe the bug

When excute: from torchrl.data.tensor_specs import TensorSpec

the error occurs: ImportError: DLL load failed while importing _torchrl

my system info:

  • Windows11
  • python 3.10
  • torchrl==0.1.1 and torchrl==0.2.0

When I install torchrl like :

pip intall torchrl==0.1.1

The error doesn't occur, but when I install locally by clone the repo(with tag 0.1.1) then do:

python.bat -m pip install -e . 

then the error occurs.

I tried torchrl==0.2.0 with pip install and pip install -e, both of them doesn't work.

To Reproduce

Steps to reproduce the behavior.

Please try to provide a minimal example to reproduce the bug. Error messages and stack traces are also helpful.

Please use the markdown code blocks for both code and stack traces.

ImportError: DLL load failed while importing _torchrl
Traceback (most recent call last):
  File "D:\OmniDrones\scripts\eval.py", line 8, in <module>
    from torchrl.data.tensor_specs import TensorSpec
  File "d:\rl\torchrl\__init__.py", line 40, in <module>
    import torchrl.collectors
  File "d:\rl\torchrl\collectors\__init__.py", line 6, in <module>
    from .collectors import (
  File "d:\rl\torchrl\collectors\collectors.py", line 39, in <module>
    from torchrl.data.tensor_specs import CompositeSpec, TensorSpec
  File "d:\rl\torchrl\data\__init__.py", line 6, in <module>
    from . import datasets
  File "d:\rl\torchrl\data\datasets\__init__.py", line 1, in <module>
    from .d4rl import D4RLExperienceReplay
  File "d:\rl\torchrl\data\datasets\d4rl.py", line 14, in <module>
    from torchrl.data.replay_buffers import TensorDictReplayBuffer
  File "d:\rl\torchrl\data\replay_buffers\__init__.py", line 6, in <module>
    from .replay_buffers import (
  File "d:\rl\torchrl\data\replay_buffers\replay_buffers.py", line 25, in <module>
    from torchrl.data.replay_buffers.samplers import (
  File "d:\rl\torchrl\data\replay_buffers\samplers.py", line 13, in <module>
    from torchrl._torchrl import (
ImportError: DLL load failed while importing _torchrl: 找不到指定的程序。

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System info

Describe the characteristic of your environment:

  • Describe how the library was installed (pip, source, ...)
  • Python version: 3.10
  • Versions of any other relevant libraries
import torchrl, numpy, sys
print(torchrl.__version__, numpy.__version__, sys.version, sys.platform)

Additional context

Add any other context about the problem here.

Reason and Possible fixes

If you know or suspect the reason for this bug, paste the code lines and suggest modifications.

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have read the documentation (required)
  • I have provided a minimal working example to reproduce the bug (required)
@HGGshiwo HGGshiwo added the bug Something isn't working label Oct 21, 2023
@vmoens
Copy link
Contributor

vmoens commented Oct 24, 2023

This will be solved by #1642 which I will push soon!

@vmoens vmoens closed this as completed Oct 24, 2023
@vmoens
Copy link
Contributor

vmoens commented Oct 25, 2023

I have pushed the binaries, you can now install torchrl with a pip install on apple silicon! Sorry for the mess

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
None yet
Development

No branches or pull requests

2 participants