How to install/uninstall python 3.x to specific path?
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
Related videos on Youtube
Giorgi
I'm a mathematician. I've been actively using LaTeX since 2012. LaTeX allows me to make many high quality documents.
Updated on September 18, 2022Comments
-
Giorgi almost 2 years
I've installed
python 3.5.2
on my system, but it was divided between folders in/usr/local
, some went tolib
, some tobin
. I know why this is for packages, which are installed byapt-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 installedtextlive2015
, from thetug.org
it all installed in one directory/usr/local/texlive
.-
Giorgi almost 8 yearsdownloaded from python.org the package, unpacked, run ./configure, make install
-
-
Giorgi almost 8 yearsI think it will work, but how do I uninstall the one which is already installed?
-
Paul Nordin almost 8 yearsI have updated the answer to include uninstall information.