why does supervisor 3.3 still setup python2.7 - python-3.x

While setting up supervisor on an Ubuntu machine via apt-get install supervisor, I noticed it setting up python2.7 as part of the installation.
I have 2 questions -
Why supervisor 3.3.1 which is relatively very new still using
python2.7? The old version was not present on my system till apt-get
installed it as a sub-dependency.
What can I do to have supervisor depend on python3.x?

Supervisor currently does not support Python 3. See the platform requirements:
Supervisor is known to work with Python 2.4 or later but will not work under any version of Python 3.

Related

How to upgrade the GPG version installed on AWS EC2

I have a requirement to upgrade the GNU Privacy Guard(GPG) package installed on AWS EC2 instance. The OS installed on EC2 is Linux(Not Ubuntu).
The current version installed is 2.0.22-5.amzn2.0.4,which is depricated as per GPG website. https://gnupg.org/download/index.html
Hence, I wish to upgrade it to version 2.3
I tried the below commands for the purpose.
$ sudo yum update-minimal gnupg
$ sudo yum reinstall gnupg
$ sudo yum update gpg
Everytime, I get a message saying NO PACKAGEs MARKED FOR UPDATE
When tried to reinstall using command number 2, the same version 2.0.22-5.amzn2.0.4 is reinstaled again, which actually isn't the latest version.
Can anyone suggest the process to upgrade to latest version?
Updated remark:
The package name on Amazon Linux 2 should be gnupg2.
You should be using Amazon Linux 2, you are using the latest package version provided by Amazon Linux 2.
By the time I write this answer, most distribution are still using gnupg 2.2, the only common distribution providing gnupg 2.3 is Fedora, you can find it at https://fedora.pkgs.org/35/fedora-x86_64/gnupg2-2.3.2-2.fc35.x86_64.rpm.html
In case you really need it now, you may either:
Build it by yourself
Install the rpm package from Fedora via dnf install <rpm-url>

Is it possible to install npm without python 2?

Context: I would like to install clasp via npm for Google Apps Script development. I'm on Ubuntu 20.04.
apt-get -s install npm shows my machine trying to install python 2 - which I don't have and don't want.
Is it possible to install npm (and therefore clasp) without having to accept python 2 and getting mired in python version problems on my machine?
No, I'm quite sure npm needs python 2. I have both python 2 & 3 on my ubuntu 20.04, and I've never had any problems caused by using both.
Also, you should probably use apt install instead of apt-get (not a significant change just, more modern and faster). Here is a link on the differences: https://itsfoss.com/apt-vs-apt-get-difference/

apt-get always installs old version of node.js

I want to install 11.x version of Node.js on my Ubuntu sevrer using apt/apt-get, but it always installs version 8.10.x. Is there a way to install the latest 12.x or 11.x version without using nvm?
I've tried apt-get update, purging nodejs, using commands below:
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install -y nodejs
None of above helped. I'm still getting an old verion of Node.js
The implementations of languages provided by operating systems tend to lean towards stability within their particular ecosystem (i.e: they play nice with everything else in the repositories). If you wish to use a newer version I recommend asdf which allows you install multiple versions of implementations of various languages including Node.

Python 3 and Vagrant without Virtualenv

I want to set up a Ubuntu VM with Python 3. All the resources I've seen so far want me to use virtualenv but I don't see the point since I only want one Python (I don't care about 2.7 in other words).
Is there a way to do this where I can just ssh into the VM and my environment is all set up for me?
There are no Ubuntu releases that default to Python 3. Maybe in the future, but as of right now, you will have to workaround the fact that Ubuntu ships with Python 2 as the default, Python 3 is available.
So pick a release of Ubuntu that you like, and then:
Upgrade the system (sudo apt update; sudo apt upgrade -y)
Install the build toolchain (sudo apt install build-essential -y)
Install Python3 (sudo apt install python3 python3-dev -y)
Switch your user to Python3 as the default; I would recommend using pyenv for this.
Once you do this, then for your user Python will default to Python 3, but for other system utilities, Python 2 will still be available.
It might just be easier to use the default Python docker image since its allows you to easily switch versions (it is based on debian).

Step by step: Installing Python 3.3, Lighttpd & Pymongo on Ubuntu 12.04

I'm currently migrating to new computer and I need to reinstall the software I am using which are:
Python 3.3,
Lighttpd (newest version),
Pymongo (newest version),
Ubuntu 12.04 Desktop (The System I'm using)
I started to install Python 3.3 by downloading it from the its official website (in tar.bz2 file) and by following this tutorial. Afterwards I installed Lighttpd and changed the lighttpd.conf for Python by following this tutorial, too.
I tried several paths for my cgi.assign, none of them worked. Especially /opt/python3.3/bin/python3.3 should be working, but it shows 500 - internal Server error all the time with a "hello world" test script.
Now regardless to this problem I have no clue on installing Pymongo. If I try to intall pip OR easy_install python3.3 I have to manually download it and execute the setup.py with my python3.3 executable, right? Because this always fails with an error:
`Error missing zlib on a bundle called distribute-0.7.3 (is this even the right tool I need, because it seems to be a legacy wrapper !?) or unknown url type: https for pymongo2.6.2 itself.`
I'm getting crazy with this setup. Why is this so difficult to handle? Other programs are just a few clicks to install even on a system like Ubuntu, but these particular development tools seem to be really difficult to install.If anybody has an idea on how to install all three together or has information on a better solution please help me out.
The system is used to program Python scripts in Eclipse and trying them out directly on the system (lighttpd). The database used is MongoDB. Python and MongoDB are communicating over the Pymongo driver. I am planning to use the system on a Server distribution on release and it has to be nicely scalable on a high amount of excecutions.
Thanks for your time,
It's easiest to use the Ubuntu repositories:
sudo apt-get update
sudo apt-get install python3 python3-pip lightppd python-pymongo
Or if that only installs the python2.x pymongo, use pip, which you've just installed:
sudo pip-3.3 install pymongo
Or better yet, use a virtualenv with the help of virtualenvwrapper (docs)
sudo pip install virtualenvwrapper
... # follow instructions for installing virtualenvwrapper
mkvirtualenv --python=/usr/bin/python3 -i pymongo mongoppd
workon mongoppd
... which will segregate the environment I've called 'mongoppd' from the rest of your system so you can't cause any trouble. Then you don't need sudo to pip-3.3 install things, just workon mongoppd then pip-3.3 install [...]. Or after the -i flag when you create the virtualenv to get it installed straight away.
In general, on Ubuntu, you should hardly ever have to install something manually. Your first attempt should be using sudo apt-get install (use tab-complete to see what's available or just google "ubuntu 12.04 packages [...]" and you'll find the list of packages). Then for python use pip install or pip-3.3 install as appropriate. You'll only need to run python setup.py install if you need to install a development version of a package or something obscure that's not on pip. I don't think there's a good reason to ever use easy_install these days.

Resources