1

I've installed python 3.5.2 on my system, but it was divided between folders in /usr/local, some went to lib, some to bin. I know why this is for packages, which are installed by apt-get, but I would prefer to install packages (which are not from package manager) to one directory.

Can this be done? And how can we properly uninstall this kind of packages?

Note:
when I installed textlive2015, from the tug.org it all installed in one directory /usr/local/texlive.

  • downloaded from python.org the package, unpacked, run ./configure, make install – Giorgi Sep 1 '16 at 7:08
1

Download and extract the source code from here. Open a terminal in the directory where you extracted the code.

./configure --prefix=/directory/to/install
make
sudo make install

Refer to ./configure --help for full details. If you want to install different python versions at the same time, use make altinstall or --exec-prefix option.

To uninstall the previous version that you installed with make, you could try to find and delete all the python directories in /usr/local or use checkinstall (recommended) to make a deb package to reinstall and uninstall:

sudo apt-get install checkinstall
cd /path/to/python/source
./configure
sudo checkinstall -D --fstrans=no make install
sudo dpkg -i Python-3.5.2.deb
sudo dpkg -r Python-3.5.2
  • I think it will work, but how do I uninstall the one which is already installed? – Giorgi Sep 1 '16 at 10:08
  • I have updated the answer to include uninstall information. – Paul Nordin Sep 1 '16 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.