Closed winjii closed 7 months ago
Hi there, thank you for your interest in our work! Unfortunately I don't have a direct answer for you, this has never occurred for us and is not directly related to our code. There don't seem to be any missing dependencies. I'd suggest searching the internet for the last error message
ImportError: numpy.core.multiarray failed to import
One guess on where the problem arose is that you installed the libraries containing libstd++.so.6
after installing the Python dependencies, so they may now be incompatible with the system libraries. You could try fixing it by setting up the entire venv again after you've installed the libraries containing libstd++.so.6
, making sure that they're in your LD_LIBRARY_PATH
while running any pip
or python
commands used for dependency installation.
I experienced the same error and upgrading numpy
to the latest version fixed the error.
Thanks your cooperation.
It went to the same error to try re-installing python and pip after putting libstd++.so.6
.
Updating numpy to 1.23.0 from 1.22.2, and the error message changed.
(.venv) winjii@DESKTOP-V3I03EF:~/sgmse$ python enhancement.py --test_dir . --enhanced_dir clean --ckpt checkpoints/train_vb_29nqe0uh_epoch=115.ckpt
/home/winjii/sgmse/.venv/lib/python3.8/site-packages/ninja/data/bin/ninja: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libstdc++.so.6)
/home/winjii/sgmse/.venv/lib/python3.8/site-packages/ninja/data/bin/ninja: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libstdc++.so.6)
/home/winjii/sgmse/.venv/lib/python3.8/site-packages/ninja/data/bin/ninja: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libstdc++.so.6)
/home/winjii/sgmse/.venv/lib/python3.8/site-packages/ninja/data/bin/ninja: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libstdc++.so.6)
/home/winjii/sgmse/.venv/lib/python3.8/site-packages/ninja/data/bin/ninja: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.35' not found (required by /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libgcc_s.so.1)
/home/winjii/sgmse/.venv/lib/python3.8/site-packages/ninja/data/bin/ninja: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /nix/store/xpxln7rqi3pq4m0xpnawhxb2gs0mn1s0-gcc-12.3.0-lib/lib/libgcc_s.so.1)
Traceback (most recent call last):
File "enhancement.py", line 10, in <module>
from sgmse.model import ScoreModel
File "/home/winjii/sgmse/sgmse/model.py", line 11, in <module>
from sgmse.backbones import BackboneRegistry
File "/home/winjii/sgmse/sgmse/backbones/__init__.py", line 2, in <module>
from .ncsnpp import NCSNpp
File "/home/winjii/sgmse/sgmse/backbones/ncsnpp.py", line 18, in <module>
from .ncsnpp_utils import layers, layerspp, normalization
File "/home/winjii/sgmse/sgmse/backbones/ncsnpp_utils/layerspp.py", line 20, in <module>
from . import up_or_down_sampling
File "/home/winjii/sgmse/sgmse/backbones/ncsnpp_utils/up_or_down_sampling.py", line 10, in <module>
from .op import upfirdn2d
File "/home/winjii/sgmse/sgmse/backbones/ncsnpp_utils/op/__init__.py", line 1, in <module>
from .fused_act import FusedLeakyReLU, fused_leaky_relu
File "/home/winjii/sgmse/sgmse/backbones/ncsnpp_utils/op/fused_act.py", line 11, in <module>
fused = load(
File "/home/winjii/sgmse/.venv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1202, in load
return _jit_compile(
File "/home/winjii/sgmse/.venv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1425, in _jit_compile
_write_ninja_file_and_build_library(
File "/home/winjii/sgmse/.venv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1506, in _write_ninja_file_and_build_library
verify_ninja_availability()
File "/home/winjii/sgmse/.venv/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1562, in verify_ninja_availability
raise RuntimeError("Ninja is required to load C++ extensions")
RuntimeError: Ninja is required to load C++ extensions
Ninja
is already contained by requirements.txt
so I have no idea to resolve this error.
I notify progress if it would made.
Hi, the top few lines in your output suggest that GLIBC is not properly installed / not accessible by Ninja. I'm afraid I'm not able to help you with this as it seems like a problem specific to the build system set up in your WSL install, or specific to WSL in general. You may have more luck asking in pytorch/pytorch
GitHub issues or PyTorch-related channels/forums, or in the repos where the relevant code originates:
score_sde_pytorch
https://github.com/yang-song/score_sde_pytorchJust to let you know, we have updated the code to PyTorch 2.X and Lightning 2.X to ensure support for newer GPUs. In the updated requirements.txt file, we haven't specified fixed versions for the required packages to allow pip to handle resolution autonomously. Please run the code again after you have created a virtual environment with the new requirements.
I use Ubuntu on WSL2 and followed the installation guide in README but bumped following runtime errors.
After adding libraries that include
libstdc++.so.6
, another error occurs.What requirements are missing in my environment?
versions: