mirror of
				https://github.com/tiyn/wiki.git
				synced 2025-10-31 02:11:15 +01:00 
			
		
		
		
	python: added manual installation guide
This commit is contained in:
		| @@ -22,6 +22,48 @@ You can then set and install your preferred version of python globally with | ||||
| Analog to managing python versions, `pipenv` can manage pip and package versions. | ||||
| A guide and description of the usage can be found on [gioele.io](https://gioele.io/pyenv-pipenv). | ||||
|  | ||||
| ### Manual Installation | ||||
|  | ||||
| This section is based on a guide by [Linuxize](https://linuxize.com/post/how-to-install-python-3-9-on-ubuntu-20-04/). | ||||
|  | ||||
| On [Linux-based systems](/wiki/linux.md) Python can be easily installed using make. | ||||
| The following shows a process of installing Python 3.9.1. | ||||
| When another Python version is needed the version number has to be adapted accordingly. | ||||
|  | ||||
| First make sure all the dependencies are installed. | ||||
| On a [Ubuntu](/wiki/linux.md#distributions) system or other systems using the apt | ||||
| [package manager](/wiki/linux/package_manager.md) this can look like the following | ||||
|  | ||||
| ```sh | ||||
| sudo apt update | ||||
| sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev | ||||
| ``` | ||||
|  | ||||
| Afterwards the python source code can be downloaded. | ||||
|  | ||||
| ```sh | ||||
| wget https://www.python.org/ftp/python/3.9.1/Python-3.9.1.tgz | ||||
| tar -xf Python-3.9.1.tgz | ||||
| cd Python-3.9.1 | ||||
| ``` | ||||
|  | ||||
| Afterwards if OpenSSL should be enabled for Python uncomment all the corresponding lines in | ||||
| `Modules/Setup`. | ||||
|  | ||||
| Then proceed with the installation. | ||||
|  | ||||
| ```sh | ||||
| ./configure --enable-optimizations | ||||
| make | ||||
| sudo make altinstall | ||||
| ``` | ||||
|  | ||||
| Afterwards you can check if the Pyhton version is installed using the following command. | ||||
|  | ||||
| ```sh | ||||
| python3.9 --version | ||||
| ``` | ||||
|  | ||||
| ### Vim | ||||
|  | ||||
| The steps to make Vim a python IDE are described in | ||||
|   | ||||
		Reference in New Issue
	
	Block a user