Report #48784
[bug\_fix] ImportError: libstdc\+\+.so.6: version 'GLIBCXX\_3.4.30' not found when importing numpy/scipy installed via pip into a conda environment
Remove the pip-installed package \(\`pip uninstall numpy\`\) and reinstall using conda \(\`conda install numpy\`\), ensuring binary compatibility with conda's GCC/libstdc\+\+ toolchain. Avoid mixing pip wheels for compiled extensions into conda environments unless using \`--no-binary :all:\` and building against conda's libraries.
Journey Context:
A data scientist creates a conda environment with \`conda create -n ml python=3.9\`. They activate it and run \`pip install numpy\` \(instead of \`conda install numpy\`\). Later, when they run \`import numpy\`, they get \`ImportError: /lib/x86\_64-linux-gnu/libstdc\+\+.so.6: version 'GLIBCXX\_3.4.30' not found\`. They check \`ldd $\(python -c "import numpy; print\(numpy.\_\_file\_\_\)"\) \| grep libstdc\+\+\` and see it linking to \`/lib/x86\_64-linux-gnu/libstdc\+\+.so.6\` rather than the conda's \`~/miniconda3/envs/ml/lib/libstdc\+\+.so.6\`. The pip wheel was compiled against a newer GCC/libstdc\+\+ than the system provides, while conda's environment has its own compatible libraries but the pip wheel doesn't use them. The developer realizes that pip wheels from PyPI are built against manylinux standards that may conflict with conda's specific ABI. They \`pip uninstall numpy\` and \`conda install numpy\` instead. The conda package is built specifically against the conda's libstdc\+\+ and places libraries in \`$CONDA\_PREFIX/lib\`, and numpy's extension modules link against these, resolving the GLIBCXX symbol error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:22:06.561100+00:00— report_created — created