3 ms·
Is there an easy way to use Python 3.11 on Debian?
by TekMol 4y ago
Is there an easy way to use Python 3.11 on Debian?
- whalesalad 4y agoInstall dependencies with apt (a few popular pages on google for this). Download tarball. Configure. Final step is ‘make altinstall’ and then you can use it standalone. If you already use virtual environments you would then recreate your venv and the rest of your experience would remain the same. I’d share actual syntax but I’m mobile right now. Alternatively a tool like pyenv makes this much easier.
- TekMol 4y agoThis might be above my paygrade, but let me try: >>> Install dependencies with apt (a few popular pages on google for this). I don't know what this means :) So let's go to step 2: >>> Download tarball. Me tries this: wget 'https://www.python.org/ftp/python/3.11.0/Python-3.11.0a1.tgz' >>> Configure. What does this mean? >>> make altinstall I guess I somehow need to untar the tar thing first? Me tries this: tar -xf Python-3.11.0a1.tgz Hurray, I have a directory :) Let's cd into it: cd Python-3.11.0a1 And now the make altinstall? make altinstall Gives me: bash: make: command not found Hm... apt install make make altinstall Gives me: make: *** No rule to make target 'altinstall'. Stop. Hm... yeah, looks like it is beyond my paygrade.
- teddyh 4y ago> >>> Configure. > What does this mean? It means to run the “./configure” script first, which is normally present in the unpacked tar file. Also, on Debian, to compile programs, you usually first have to install the “build-essential” package.
- TingPing 4y ago> > Install dependencies with apt (a few popular pages on google for this). > I don't know what this means :) So let's go to step 2: `apt-get build-dep python3`
- heavyset_go 4y agoCheck out pyenv, it will automatically build and install 3.11b3 if you ask it to.
- TekMol 4y agoHow do you ask it to do so?
- heavyset_go 4y agoThis should work assuming you've got your compiler toolchain installed: pyenv install 3.11.0b3
- pypanta 4y agoTry with this tutorial: https://pypanta.github.io/how-to-install-python-from-source-on-debian-gnu-linux.html https://pypanta.github.io/how-to-install-python-from-source-... I also using Debian 11, and this is how I always install Python from source: wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0b3.tgz tar xvzf Python-3.11.0b3.tgz cd Python-3.11.0b3.tgz sudo apt install libssl-dev zlib1g-dev libbz2-dev liblzma-dev libffi-dev tcl-dev libgdbm-dev libsqlite3-dev libreadline-dev tk tk-dev libmpdec-dev ./configure --enable-loadable-sqlite-extensions --enable-shared --with-lto --enable-optimizations --with-system-expat --with-system-ffi --with-computed-gotos --with-system-libmpdec --enable-ipv6 CC=x86_64-linux-gnu-gcc make sudo make altinstall
- TekMol 4y agoAfter that, I have a command "python 3.11" but when I try to run it, I get this: python3.11: error while loading shared libraries: libpython3.11.so.1.0: cannot open shared object file: No such file or directory