question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PyTorch fails on import

See original GitHub issue

Not sure if this is the place to report it, but it seems like trying to import pytorch fails completely atm in kernels. Even if it’s the first and only import.

 [1]:

import torch
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-c031d3dd82fc> in <module>()
----> 1 import torch

/opt/conda/lib/python3.6/site-packages/torch/__init__.py in <module>()
     51 sys.setdlopenflags(_dl_flags.RTLD_GLOBAL | _dl_flags.RTLD_NOW)
     52 
---> 53 from torch._C import *
     54 
     55 __all__ += [name for name in dir(_C)

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
nerdchacommented, Mar 9, 2018

https://github.com/Kaggle/docker-python/pull/192 seems to have done the trick, but please let us know if you hit any other issues.

1reaction
kmadercommented, Jan 19, 2018

It seems to also happen in Script Kernels on Kaggle as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot import torch module - python - Stack Overflow
Open command prompt or terminal and type: pip3 install pytorch. If it says pip isn't installed then type: python -m pip install -U...
Read more >
Error when import torch · Issue #12711 - GitHub
Hi, I have an error when import torch. System: win10 install: conda My python is: Python 3.6.3 :: Anaconda custom (64-bit) I install...
Read more >
Import torch failed - PyTorch Forums
Hello, I can't import torch and here is my error. I don't know what is wrong with it. import torch File "C:\Users\Tsai\anaconda3\envs\tf\lib ...
Read more >
Import torch not working - PyTorch Forums
python models/download_models.py it just gives me an error and says that the torch module can not be imported because it does not exist....
Read more >
Pytorch fails to import when running script in slurm - distributed
I am trying to run a pytorch script via slurm. I have a simple pytorch script to create random numbers and store them...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found