dpkg error: pycompile: not found

前端 未结 5 812
猫巷女王i
猫巷女王i 2021-02-01 08:31
sudo apt-get remove --purge mysql-server mysql-client mysql-common

I am getting the following error as I try to remove mysql using the above command:

5条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-01 09:14

    Despite py3compile and py3clean being present in /usr/bin/, my Lubunutu 16.10 shell (tcsh) kept complaining that py3compile was not there. After hours of frustration, I discovered that the first line in pycompile was:

    ! /usr/bin/env python

    or something like that, which referred to Python2.7 on my system. Changing that to point to Python 3 with:

    ! /usr/local/bin/python3

    suddenly made py3compile visible!

    Turns out that the shell said py3compile did not exist even when it was in its path or was directly executed with "/usr/bin/py3compile" when py3compile referred to Python2.7. The shell did not even complain about the Python version or anything, it just claimed py3compile itself did not exist!

    I got into this mess because I wanted to remove and reinstall Python 3.5, upon doing which I discovered that there is still a Python 3, which I then discovered comes from a python-minimal, which I tried to remove and reinstall. The python-minimal would not reinstall, even after I tried every thing I could find on the net and every package manager. They all would complain about py3compile missing. Now I discovered this fix for py3compile.

提交回复
热议问题