1
votes

When I try importing pytorch inside a jupyter notebook i get the following error:

ImportError: dlopen: cannot load any more object with static TLS pytorch

import torch

No error when i import torch from command line (not jupyter notebook)

1
Have you already checked out github.com/pytorch/pytorch/issues/2083 ?Abhai Kollara
Yes. I think i have a different kind of problem as i get the error message even when i just import only pytorch and nothing else.Ioannis Nasios

1 Answers

2
votes

For reasons i cannot yet explain, i found out that this is happening only when i install Keras too in the same virtual environment, and it goes away when i uninstall Keras.

So the solution was

pip uninstall keras