Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // To install Python/PIP
- !!! You need OpenSSL! To setup see: https://pastebin.com/rZ2jUpFr
- # Via APT (igore the whole content below this)
- wget http://ftp.de.debian.org/debian/pool/main/p/python3.13/python3.13_3.13.0~b2-1_amd64.deb
- wget http://ftp.de.debian.org/debian/pool/main/p/python3.13/python3.13-minimal_3.13.0~b2-1_amd64.deb
- wget http://ftp.de.debian.org/debian/pool/main/p/python3.13/python3.13-venv_3.13.0~b2-1_amd64.deb
- wget http://ftp.de.debian.org/debian/pool/main/p/python3.13/python3.13-dev_3.13.0~b2-1_amd64.deb
- wget http://ftp.de.debian.org/debian/pool/main/p/python3.13/libpython3.13_3.13.0~b2-1_amd64.deb
- wget http://ftp.de.debian.org/debian/pool/main/p/python3.13/libpython3.13-stdlib_3.13.0~b2-1_amd64.deb
- wget http://ftp.de.debian.org/debian/pool/main/p/python3.13/libpython3.13-minimal_3.13.0~b2-1_amd64.deb
- wget http://ftp.de.debian.org/debian/pool/main/s/setuptools/python3-setuptools-whl_68.1.2-2_all.deb
- wget http://ftp.de.debian.org/debian/pool/main/p/python-pip/python3-pip-whl_24.1+dfsg-1_all.deb
- wget http://ftp.de.debian.org/debian/pool/main/p/python3.13/libpython3.13-dev_3.13.0~b2-1_amd64.deb
- dpk -i *.deb
- rm *.deb
- # Install dependence
- apt install make build-essential libaugeas-dev libssl-dev zlib1g-dev libbz2-dev libreadline-dev libgdbm-dev libnss3-dev libffi-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev liblzma-dev tk-dev libjs-jquery libjs-underscore libjs-sphinxdoc -y
- ## When Python was installed
- apt purge python* -y
- apt autoremove -y
- # To see all exists versions, go to https://www.python.org/ftp/python
- # The version of the generation
- version=3.12
- # The version of the undergeneration pythons
- ugversion=3.12.0
- # The undergeneration underversion of python
- ugunderVersion=3.12.0b4
- wget https://www.python.org/ftp/python/$ugversion/Python-$ugunderVersion.tgz --no-check-certificate
- gunzip Python-$ugunderVersion.tgz
- tar xvf Python-$ugunderVersion.tar
- mv Python-$ugunderVersion /usr/local/python
- rm -r Python-$ugunderVersion.tar
- cd /usr/local/python
- bash configure --prefix=/usr/local/python --with-openssl=/usr/local/openssl --with-openssl-rpath=auto --with-ssl-default-suites=openssl --enable-optimizations --with-lto --with-computed-gotos --enable-shared --with-ensurepip=install
- CFLAGS="-I/usr/local/openssl/include"
- LDFLAGS="-L/usr/local/openssl"
- C_INCLUDE_PATH=/usr/local/python/Modules/_ctypes/libffi_osx/include
- make -j
- make altinstall
- ln -s /usr/local/python/bin/* /usr/bin
- ln -s /usr/bin/pip$version /usr/bin/pip
- ln -s /usr/local/python/python /usr/bin
- cp lib/libpython* /usr/lib
- # If pip is not preinstalled
- wget https://bootstrap.pypa.io/get-pip.py
- python get-pip.py
- rm -r get-pip.py
- # If the error comes, Python.h could not be found (replace "packagename" with the package, what you want do install)
- CFLAGS="-I/usr/local/python -I/usr/local/python/Include" pip install packagename
- // To uninstall Python/PIP
- rm -r /usr/local/python
- rm -r /usr/bin/2to3*
- rm -r /usr/bin/python*
- rm -r /usr/bin/pip*
- rm -r /usr/bin/idle*
- rm -r /usr/bin/py*
- rm -r /usr/lib/libpython*
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement