I am using miniconda and my python binary is at $HOME/miniconda3/bin/python.
After installing distutils-extra by
sudo apt-get install python3-distutils-extra
I found the library is installed at /usr/lib/python3/dist-packages/DistUtilsExtra/ but it cannot be used by the conda python.
$/usr/bin/python3
Python 3.8.10 (default, Jun 22 2022, 20:18:18)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import DistUtilsExtra
>>> DistUtilsExtra.__file__
'/usr/lib/python3/dist-packages/DistUtilsExtra/__init__.py'
>>>
$python
Python 3.9.12 (main, Jun 1 2022, 11:38:51)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import DistUtilsExtra
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'DistUtilsExtra'
>>>
It seems I have to use /usr/bin/python3 instead of python to import it.
I am using miniconda and my python binary is at
$HOME/miniconda3/bin/python
.After installing distutils-extra by
I found the library is installed at
/usr/lib/python3/dist-packages/DistUtilsExtra/
but it cannot be used by the conda python.It seems I have to use
/usr/bin/python3
instead ofpython
to import it.