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.

denseCRF3D import error

See original GitHub issue

In a clean conda environment, I did the following to install MONAILabel (wanted it from source so I could use my branch)

conda create -n monai-label python=3.9 -y
conda activate monai-label
conda install pytorch cudatoolkit=11.3 -c pytorch -y
cd <path/to/MONAILabel>
pip install -e .

Then the following line causes an error

python -c "monailabel start_server ..."

And more specifically, so does the following

python -c "from monailabel.scribbles.transforms import denseCRF3D"

Both times the error is as follows:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/rich/Documents/Code/MONAILabel/monailabel/scribbles/transforms.py", line 16, in <module>
    import denseCRF3D
ImportError: /home/rich/miniconda3/envs/monai-label/lib/python3.9/site-packages/denseCRF3D.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZSt28__throw_bad_array_new_lengthv

Any idea what’s going on?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
masadcvcommented, Feb 3, 2022

Thanks @SachidanandAlle and @diazandr3s ! I am looking into this.

@rijobro this error is coming from SImpleCRF installation - I am unsure why it is causing this. As Andres mentioned, there is another ticket to resolve some installation issues with SimpleCRF on windows.

For now, the easiest and quickest solution would be to make these optional_import (unless I am missing something). This means you will lose Scribbles functionality, but be able to get around the errors and use everything else until we find a fix. I will add a PR to do this for all SimpleCRF imports

1reaction
SachidanandAllecommented, Feb 3, 2022

@masadcv can you handle the import error and automatically exclude scribbles in the app if import fails due to xyz reasons…

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use pydensecrf in Python3.7? - Stack Overflow
error ERROR: Command errored out with exit status 1: command: 'C:\Users\Aparajita Das\Anaconda3\python.exe' -u -c 'import sys, setuptools, ...
Read more >
【Python】 pydensecrf import error - Lixiang Ru's Blog
I am a Student in the School of Computer Science, Wuhan University. Content. Homepage. Tags · About Me. Contact me.
Read more >
How to Fix PyCharm Import Error and Setup Your Interpreter
This will show you how to fix common pycharm import errors when trying to import python modules. Please watch through the entire video...
Read more >
Python Import Error Module Not Found Error - YouTube
Python Import Error Module Not Found Error : No Module Named Panda3D In Ubuntu LinuxCommands to Install Panda3D Python Library: sudo apt ...
Read more >
Fix PyCharm Import Error and Setup Your Interpreter - YouTube
This video describes how to fix any library import error in Pycharm IDE when trying to import python modules.
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