Skip to content

Cannot use with pytorch due to libgomp issue #42

@fjsj

Description

@fjsj

I've found the following issue when trying to use n2 with pytorch in the same project.
It only happens when pytorch is imported BEFORE n2. When n2 is imported, I get this:

>>> import n2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /home/user/workspace/n2/venv/lib/python3.8/site-packages/torch/lib/libgomp-7c85b1e2.so.1: version `GOMP_5.0' not found (required by /home/user/workspace/n2/venv/lib/python3.8/site-packages/n2.cpython-38-x86_64-linux-gnu.so)

Steps to reproduce are very simple.
Just run pip install torch n2 ,then run:

import torch
import n2

My machine is:

  • Python 3.8.6
  • Ubuntu 20.04.2 LTS

Any available workarounds other than forcing import order?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions