henrywoo / kazam

Kazam - Linux Desktop Screen Recorder and Broadcaster
GNU General Public License v3.0
136 stars 15 forks source link

python3-distutils-extra doesn't work with python installed by conda #6

Closed henrywoo closed 1 year ago

henrywoo commented 1 year ago

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.

henrywoo commented 1 year ago

The solution is here:

https://github.com/henrywoo/distutils-extra#0-installation