Python Installation using sudo make install + obligatory Linux rant
-
Playing around with AWS Lambda functions and following this tutorial
There is one step that goes
Install Python 3.6 and virtualenv using the following steps:
sudo yum install -y gcc zlib zlib-devel openssl openssl-devel wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz tar -xzvf Python-3.6.1.tgz cd Python-3.6.1 && ./configure && make sudo make install sudo /usr/local/bin/pip3 install virtualenv
This seems very new to me. I usually do the following
sudo apt-get install python3.6
pip3 install virtualenv
Is there any reason why the tutorial suggests using sudo make install instead?
I'm not familiar with Linux much so there's a high likelihood I'm asking a very dumb question, so go a little ELI5 on me.
-
@stillwater Those instructions are for compiling it yourself, instead of using a package manager. The
./configure
,make
,make install
dance was pretty much universal on Linux until, what, 10–15 years ago? So it’s probably a tutorial written by someone who’s used Linux long enough that package managers are considered newfangledness.Be prepared for all kinds of reports about missing or outdated dependencies if you install things with this method, by the way. (That’s one of the reasons that I eventually gave up on Linux, when you get right down to it. I was sick and tired of having to install and/or update dozens of libs to get just about anything to work.)
-
@Gurth said in Python Installation using sudo make install:
I was sick and tired of having to install and/or update dozens of libs to get just about anything to work
Fanboys incoming to defend the honor of Linux pretty soon. In all seriousness, I'm not using Linux cos I want to but I need to, so I guess my way of apt-get install and pip install should be good enough for most of the linuxy stuff?!
-
Wow AWS has a lot of unfuckingbelievably large amounts of tonloads of rigamarole jesus fuck.
-
I give up. Fuck this shit.
-
@stillwater said in Python Installation using sudo make install:
I give up. Fuck this shit.
I know this feeling too.
Come, join the anti-Linux-bullshit side. You can start by yelling "a build system should NOT be in charge of installing, what the fuck!" or "an OS should have one place to put user software, not 425!"
-
@anonymous234 said in Python Installation using sudo make install:
an OS should have one place to put user software, not 425!
Huh? There are exactly two for stuff you build yourself:
/opt
and/usr/local
. Maybe a third,~/.local
, if you ever want to install something for a single user. That's it.You shouldn't ever touch anything else.
-
@anonymous234 said in Python Installation using sudo make install:
I know this feeling too.
Come, join the anti-Linux-bullshit side.No that's just not it. I tried playing around with Linux 5 years back, found things too convoluted and time consuming to setup, gave up. Happened again. Happened again. Happened again. Happened again.
Happened today.
How the fuck are things staying the same for so long. Everytime I try installing a package I get anxiety as to where it's gonna fail and it fails for some bizarre dependency breaking cos of some other bizarre dependency fucking every time and then you go online and there are 1230 ways to fix it out of which the first one never works for some reason. The fixes for issues get outdated faster than the depencies how the fuck is this possible what magic is this fuck this shit. Linux is just frustrating. Goddamn shame I have to use it sometimes cos of some cool kid who won't touch windows cos raisins. Sigh
-
@stillwater This is a bad tutorial, nobody does that for python. It would be acceptable if you need something that isn't available in the package manager.
Even so, generally stuff are distributed in a package. If a software is only distributed with make install I usually rethink if I really need it.
-
@sockpuppet7 said in Python Installation using sudo make install + obligatory Linux rant:
This is a bad tutorial, nobody does that for python
This is on the main tutorial for AWS Lambda. What the fuck is up with the docs people? Either shit is old or shit does not match the actual product. No wonder amazon makes everyone work for 2199312093 hours a week. Imagine how much it would suck if they worked any less.
-
Well, it looks like it's using
yum
, which is on Red Hat-based linux, whereasapt
is on Debian-based linux.I don't know much about
yum
, but there doesn't seem to be a Python36 package here: http://mirror.centos.org/centos/7/os/x86_64/Packages/
-
@ben_lubar Looks like this seems to be more like the reason the way the tutorial is over the "old linux guy wrote it" scenario.
-
@dfdub said in Python Installation using sudo make install + obligatory Linux rant:
@anonymous234 said in Python Installation using sudo make install:
an OS should have one place to put user software, not 425!
Huh? There are exactly two for stuff you build yourself:
/opt
and/usr/local
. Maybe a third,~/.local
, if you ever want to install something for a single user. That's it.You shouldn't ever touch anything else.
Let's see, where does software go on Linux?
Generally, it's set up with prefixes and then specific paths within those prefixes.
Prefixes:
/
- operating system/usr
- package manager/usr/local
- self-compiled/opt/*
- third-party/usr/x86_64-w64-mingw32
(for example) - cross-compilers
Within those prefixes:
bin
- user programssbin
- administrative programsshare
- static program datalib
- shared libraries (usually in subdirectories)lib32
- 32-bit librarieslibx32
- 64-bit libraries (move over, wow64!)include
- C/C++ headers
Additionally, system-wide, there are some commonly-used directory paths:
/boot
- kernel and bootloader/root
- root (super-admin user) home directory/home/*
- user home directories/mnt
and/media
- removable filesystems like CDs/dev
- devices (drives, input devices, abstract concepts like /dev/null, /dev/urandom, and /dev/full)/etc
- configuration files/proc
- pseudo-filesystem containing information about running processes and kernel settings/lost+found
- part of the EXT filesystem that stores files that are found during the equivalent of chkdisk/tmp
- temporary files and named sockets
There's also
/var
, which contains quite a few subdirectories that can be described as "data".backups
,cache
,crash
,log
,mail
,metrics
,spool
- exactly what you expect a directory with that name to containlib
- the Linux equivalent ofC:\ProgramData
run
- named sockets, process IDs, etc.tmp
- temporary files. usually longer-lived than/tmp
./tmp
is sometimes stored in-memory, but/var/tmp
is not.
-
@stillwater said in Python Installation using sudo make install + obligatory Linux rant:
Is there any reason why the tutorial suggests using sudo make install instead?
Possibly because the author of the tutorial was an idiot? It's annoyingly common… Or, more charitably, because the tutorial predates 3.6 being available in standard repositories and hasn't been updated since. Which is even more common than authors being idiots. If you're ahead of the repos, the build instructions make sense. I remember having to do that with the VMs we were using for CI development prior to the upstreams getting sorted out.
(Using virtualenv is sensible.)
-
@ben_lubar said in Python Installation using sudo make install + obligatory Linux rant:
I don't know much about yum, but there doesn't seem to be a Python36 package here: http://mirror.centos.org/centos/7/os/x86_64/Packages/
On RHEL, you need to use software collections to get Python 3.6. For some reason, many people think that's too complicated/annoying/??? and install stuff from source instead.
In this case, it's definitely incredibly stupid not to use software collections, since you create a virtualenv once and then never have to use
scl
ever again.
-
@ben_lubar
/opt
is not a regular prefix that's meant to have the same folder structure as~/.local
,/usr
and/usr/local
. It's likeProgram Files
on Windows: You create a subdirectory and dump arbitrary stuff there.Anyways, you usually don't need to care about any of this. You need to know
/etc
,/home
and/opt
and maybe/usr/local
if you ever install anything from source. The only other thing you might need to know as the average user is/var/log
and that's pretty much it. All other folders contain stuff you probably won't ever touch.
-
On any Linux distro:
-
is <software-requiredversion> available in the repos? If so, install from repo (apt for Debian, Ubuntu, Mint and whatever builds on top of Debian; yum or dnf for RHEL, Fedora, CentOS, SUSE and their relations; pacman for Arch and company; eopkg for Solus - the rest are too obscure to list, and even Solus is obscure enough really)
-
if not, think through whether you need that version. If not, just go with what's in the repos
-
if you really need that version, see if it has been packaged in a reputable third-party repo (PPAs for Ubuntu, RPMFusion and sometimes the SUSE build system for .rpm packages, the AUR for Arch). Add the repo, update the database and go back to step 1
-
if it hasn't been packaged in a repo, see if it's available as an independent package (because it's better to have it dealt with by the package manager) or, possibly, as a Flatpak/Snap (sandboxed universal packages)
-
as a last resort, you compile the software yourself or use the official installer for closed-source software
It's not that hard really. On Windows, you have to first check if it's in the Store, if it isn't, go on their website and download an installer - which basically amounts to skipping all the intermediate steps in the above flowchart; portable installs don't require you to install anything, and there is stuff like that on Linux too, but it's rare.
-
-
Whats a Linux distro that doesn't have a UI that sucks dick like Ubuntu and relatively stable?
-
@stillwater said in Python Installation using sudo make install + obligatory Linux rant:
Whats a Linux distro that doesn't have a UI that sucks dick like Ubuntu and relatively stable?
You should probably tell us what exactly you dislike about Ubuntu's UI first. Otherwise, everyone will recommend his favorite GUI whether it's actually good or not.
-
@stillwater which version of Ubuntu? If you're talking older versions shipped with Unity, now they ship with Gnome. If you hate Gnome, there is Kubuntu (KDE), Ubuntu Mate (with MATE, ie. Gnome 2 basically), Xubuntu (with XFCE), Linux Mint MATE (like above) or Cinnamon (with a "Windows-style" Gnome 3 spinoff), and many others. None are as "professional" as either macOS or Windows, but in my experience they are workable. Kubuntu is fine really.
-
@ben_lubar Is there any software that actually qualifies for
/opt
that isn't a game? I thought in Linux-land everything either came from your package manager or from source. I didn't think application developers were big on shipping binaries.
-
@dfdub said in Python Installation using sudo make install + obligatory Linux rant:
@stillwater said in Python Installation using sudo make install + obligatory Linux rant:
Whats a Linux distro that doesn't have a UI that sucks dick like Ubuntu and relatively stable?
You should probably tell us what exactly you dislike about Ubuntu's UI first. Otherwise, everyone will recommend his favorite GUI whether it's actually good or not.
It has the default orange thingy and when I tried to apply themes something or the other has colors or size that were off or something was overlapping the other. I want something clean out of the box. It's a subjective thing so I'm not articulating it really well. I like the Mac UI and would probably want something like that.
-
@stillwater in particular, if you like Windows, the most similar UIs are provided by Cinnamon (best on Mint) and KDE (I think best on Kubuntu, but probably Arch/Antergos/Manjaro are fine too). Arch aims at being something of a l33t distro, where you install everything from the command line. Antergos and Manjaro do away with that bullshit, while still being basically Arch (Antergos more so, I think). The main difference between Arch and Ubuntu is that Arch is a rolling distro (everything is "new") while Ubuntu, like Debian and most other traditional distros, freeze versions at distro release and only release bugfixes (more or less), so they're more stable but also feature older software. Basically Arch is something like Debian Sid, but with the pretense of being the actual distro and not the experimental branch. Apparently it breaks sometimes but it's rare.
-
@admiral_p said in Python Installation using sudo make install + obligatory Linux rant:
which version of Ubuntu?
Ubuntu 16.04
I have zero idea about Gnome or KDE or Unity or what have you. I might probably have to research all this before I can install something.
-
@admiral_p I'm hearing Linux Mint thrown around a lot. Never tried it. Should probably give it a look.
-
@stillwater if you like the Mac UI there is a
shameless copydistro heavily inspired by macOS called Elementary, which is based on Ubuntu.If you don't like orange, Mint is green. Kubuntu is blue I think.
If you hate the command line, stick with Ubuntu stuff. It's the one that does a somewhat better job of letting you do everything from the GUI. Now that I think of it, SUSE might be better for this but it's very unrefined on other aspects (eg. no subpixel filtering, so bad fonts; very spartan, dated look; YaST, basically "the control panel", is powerful and full-featured but it's also slow in my experience).
-
@admiral_p Kubuntu looks clean enough for my purposes. I already have win10. Is there a way to install a Linux distro but not have the Linux bootloader load first to choose which os to boot into, instead have the windows bootloader let me choose. Is that even possible?
-
@stillwater I have no idea, I'm Windows-less and have been for years. You can tell GRUB to boot automatically into Windows though. If you're going to try distros why don't you first install them into a VM? Much more effortless and you can wipe everything out if and when you eventually decide to actually install Linux on your hard drive.
-
@stillwater said in Python Installation using sudo make install + obligatory Linux rant:
@Gurth said in Python Installation using sudo make install:
I was sick and tired of having to install and/or update dozens of libs to get just about anything to work
Fanboys incoming to defend the honor of Linux pretty soon.
If they do, they have no right to speak unless they recreate the situation of about 15 years ago by deliberately not using package managers for, say, a few months and instead install everything they need by hand during that time. See how much they like having to hunt for sites that hold certain versions of required libs, only to find that each of those libs in turn needs several others of specific versions as well. (More than once, I read documentation for a program claiming it needed “version x.y.z or newer” and then found that version x+2.w.v got rejected but x+1.u.t wasn't …)
-
@Gurth You know what's more fun than that? Trying to compile/install PHP on Solaris on SPARC, only to be defeated hours later by a vague unhelpful error that no-one in the history of the Internet has ever encountered because no-one else is silly enough to even try that.
-
@loopback0 Yeah, that's a feature. Don't do that. Also vicinity contains no
a
.
-
@loopback0 said in Python Installation using sudo make install + obligatory Linux rant:
@Gurth You know what's more fun than that? Trying to compile/install PHP on Solaris on SPARC, only to be defeated hours later by a vague unhelpful error that no-one in the history of the Internet has ever encountered because no-one else is silly enough to even try that.
segfault? Yeah, who would do something like that?
-
@Gribnit said in Python Installation using sudo make install + obligatory Linux rant:
Also vicinity contains no a.
It does if you misspell it.
-
@stillwater said in Python Installation using sudo make install + obligatory Linux rant:
Ubuntu 16.04
I have zero idea about Gnome or KDE or Unity or what have you. I might probably have to research all this before I can install something.Why not use the latest Ubuntu? It now uses Gnome 3 and you can easily revert it to the default theme.
-
@stillwater said in Python Installation using sudo make install + obligatory Linux rant:
Is there a way to install a Linux distro but not have the Linux bootloader load first to choose which os to boot into, instead have the windows bootloader let me choose. Is that even possible?
I vaguely remember trying that once. It's possible in principle using a tool called EasyBCD.
That said, why do you even want that? It's just a lot of unnecessary pain.
-
@stillwater said in Python Installation using sudo make install + obligatory Linux rant:
@anonymous234 said in Python Installation using sudo make install:
I know this feeling too.
Come, join the anti-Linux-bullshit side.No that's just not it. I tried playing around with Linux 5 years back, found things too convoluted and time consuming to setup, gave up. Happened again. Happened again. Happened again. Happened again.
Happened today.
How the fuck are things staying the same for so long. Everytime I try installing a package I get anxiety as to where it's gonna fail and it fails for some bizarre dependency breaking cos of some other bizarre dependency fucking every time and then you go online and there are 1230 ways to fix it out of which the first one never works for some reason. The fixes for issues get outdated faster than the depencies how the fuck is this possible what magic is this fuck this shit. Linux is just frustrating. Goddamn shame I have to use it sometimes cos of some cool kid who won't touch windows cos raisins. Sigh
You may have misread what he said.
-
@stillwater said in Python Installation using sudo make install + obligatory Linux rant:
@admiral_p said in Python Installation using sudo make install + obligatory Linux rant:
which version of Ubuntu?
Ubuntu 16.04
I have zero idea about Gnome or KDE or Unity or what have you. I might probably have to research all this before I can install something.
Tip: On windows you don't research tons of different shit. The best version is the first party version so it comes preinstalled.
-
@pie_flavor shh just let it happen
-
@ben_lubar gobolinux supposedly use a very different pattern, that sounded interesting, I've yet to install it on some VM
-
@sockpuppet7 said in Python Installation using sudo make install + obligatory Linux rant:
@ben_lubar gobolinux supposedly use a very different pattern, that sounded interesting, I've yet to install it on some VM
It does indeed sound interesting, especially the way it says all traditional prefixes and things are transparently symlinked to their centralized equivalents....
-
@Unperverted-Vixen said in Python Installation using sudo make install + obligatory Linux rant:
@ben_lubar Is there any software that actually qualifies for
/opt
that isn't a game? I thought in Linux-land everything either came from your package manager or from source. I didn't think application developers were big on shipping binaries.I believe VSCode installs there.
-
@sockpuppet7 said in Python Installation using sudo make install + obligatory Linux rant:
@ben_lubar gobolinux supposedly use a very different pattern, that sounded interesting, I've yet to install it on some VM
NixOS uses cryptographic hashes. I got to the point of installing it in a VM, but I don't think I've actually ever used it beyond the first time I ran it.
-
@admiral_p said in Python Installation using sudo make install + obligatory Linux rant:
If you're going to try distros why don't you first install them into a VM? Much more effortless and you can wipe everything out if and when you eventually decide to actually install Linux on your hard drive.
Of course, depending on how seriously you want to try it out, most distros you can start by running them from a CD before you install them.
-
I could not get over the feeling of giving my PC an STD so found a middle ground.
Windows subsystem for Linux - Ubuntu.
So far so good.
-
@Unperverted-Vixen said in Python Installation using sudo make install + obligatory Linux rant:
@ben_lubar Is there any software that actually qualifies for
/opt
that isn't a game? I thought in Linux-land everything either came from your package manager or from source. I didn't think application developers were big on shipping binaries.$ ls /opt cmake eff.org golang keybase newrelic valgrind
I have no idea how many of those were put there by me, but probably at most half.
-
@Unperverted-Vixen said in Python Installation using sudo make install + obligatory Linux rant:
Is there any software that actually qualifies for
/opt
that isn't a game?Commercial software, especially of the “well that's rather expensive but I need it” sort, such as ANSYS or ARM's own compiler. The latter generates quite a bit better code than GCC, and that's really useful on some systems due to resource constraints.
-
@pie_flavor said in Python Installation using sudo make install + obligatory Linux rant:
Tip: On windows you don't research tons of different shit. The best version is the first party version so it comes preinstalled.
You use Candy Crush for all your gaming needs?
-
@dkf It is in fact a half decent game, if you ignore the fact that they ripped it wholesale off of Bejeweled.
-
@stillwater A perfect recipe for a rant:
- Follow a dumbfuck tutorial written by a random rajesh in the guts of amazon, or a random hipster rajesh on medium
- Conclude that linux is dumb since the tutorial is dumb
Meanwhile, all windows tutorials written by random rajeshes who tell to download random shit from internets or poke in random registry keys without really thinking are good, no doubts about it.
-
@stillwater said in Python Installation using sudo make install + obligatory Linux rant:
How the fuck are things staying the same for so long. Everytime I try installing a package I get anxiety as to where it's gonna fail and it fails for some bizarre dependency breaking cos of some other bizarre dependency fucking every time and then you go online and there are 1230 ways to fix it out of which the first one never works for some reason. The fixes for issues get outdated faster than the depencies how the fuck is this possible what magic is this fuck this shit. Linux is just frustrating. Goddamn shame I have to use it sometimes cos of some cool kid who won't touch windows cos raisins. Sigh
This pretty much describes the struggles I went through to fire up a single utility to unfuck the smartcard reader in my laptop. No, I didn't succeed: the version of the tools was wrong, then they told the version of my system was wrong, then they kind of detected the reader, but no, they couldn't change the radio mode on it, then the phase of moon was wrong, then I just grew frustrated and tired.
Note that all of the above was on Windows, because Broadcom and reasons.