NVIDIA-AI-IOT / jetcard

An SD card image for web programming AI projects with NVIDIA Jetson Nano
MIT License
209 stars 83 forks source link

PyTorch not working in JupyterLab #34

Open YaBr11 opened 3 years ago

YaBr11 commented 3 years ago

Hi everyone,

I tried the new Jetcard Image based on Jetpack 4.5.1 on my Jetson Nano A02. But as soon as I try to import torch or torchvision in a Jupyter Notebook I get the following error: OSError: /usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block

Importing torch in terminal using the python3 environment works fine. Any ideas what's the cause for that? Thank you

baixianger commented 3 years ago

here is the easy way to solve your problem: add a new path to the ~/.bashrc, then source it.

sudo vim ~/.bashrc
#add the line I mentioned below
source ~/.bashrc
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1