Jupyter dlopen cannot load any more object with static TLS
A weird problem that execute "import torch" in bash works but when you run it in Jupyter notebook:
1 | ImportError Traceback (most recent call last) |
Seems that it's a compatibility issue. Even though there are a large volume of discussions but none of them works. Ironically, I accidently fixed the issue by resolving another: # RuntimeError cuDNN error CUDNN_STATUS_EXECUTION_FAILED Solution
Potential Solution
I marked these solutions as "potential" because I didn't make a strict control variable experiment. I tried all of them and it worked. :-)
My environment: 1
2
3
4
5
1. Ubuntu 14.04 LTS
2. Python 3.6.9
3. PyTorch 1.3.0
4. cuda 10.1 (Tesla K40m)
The order of following solutions matters.
Upgrade/Downgrade Cuda
To the best of my understanding, this operation does the trick (but didn't verified). Downgrade cuda from 10.x to 9.0.
Upgrade/Downgrade PyTorch
1 | conda install pytorch==1.2.0 torchvision==0.4.0 cudatoolkit=10.0 -c pytorch |
If you use conda, you can refer to this page to find a working combination: INSTALLING PREVIOUS VERSIONS OF PYTORCH
Upgrade Jupyter
1 | conda update jupyter |
Upgrade Ubuntu
I do-release-upgrade from 14.04 to 16.04 and finally
18.04 LTS. Ubuntu
Upgrades