Snap or PIP is better?

Hi,

I am running my server on CentOS 8 stream. I used PIP to install certbot.

Now, after updating snapd is available on the system.

Which one should I use? Snapd or PIP? and why? I have the following questions.

  1. How to uninstall pip and install snap? Do I need to uninstall PIP before installing Snap? or Can they co-exist?

  2. Does snap require manual monthly update? or it will be updated automatically?

  3. Does snap require python?

  4. Will I need to update the Snap app periodically? My current version of Snap is 2.58.3-1.el8. It is not the latest. I searched the internet for upgrading Snap. But in vain.

  5. I am using CentOS 8 stream. It has EOL during 2024. After that, do I need to upgrade my linux distro to newer version? or it will continue to work?

  6. Does it need cron command to update the certificates automatically?

  7. Minimum version of Snap required?

  8. Python required?

Thanks.

This is up to you. Do what you're most comfortable with.

3 Likes

@9peppe Can you answer the questions I asked?

Thanks

They can coexist but it can be messy and pointless. There's usually no reason to have both.

Automatically

Not on your OS, Snap will package whatever it needs and bring it along.

Your OS should take care of that.

Snap should not care. Nor should pip.

It should install a systemd timer.

No idea.

Is python a snap dependency, you mean? I don't know.

6 Likes

The answer to your exact question is: you can and probably should have pip and snap co-existing. However, if your question is Certbot specific, then it's very unwise to have TWO instances of Certbot installed next to each other (e.g., one instance installed using pip and another installed using snap).

Applications installed using snap are automatically updated. Pip installations are not and can lead to dependency hell. If snap itself is also automatically updated: I don't know.

No.

No.

Upgrading EOL distributions is ALWAYS a good idea and is a separate issue from snap/pip/Certbot/whatever.

No, not if you installed Certbot using snap. Certbot/snap should take care of this automatically.

No minimum version of snap required as far as I know.

3 Likes

@Osiris Thanks for your answer. So, as far as you, which one should I use? PIP or Snap?

1 Like

@Osiris I already have PIP installed. how can I uninstall it? You know the command? For Centos 8 stream.

I'd advise snap, unless you have principled objections. I'd only suggest pip if snap is not an option and your distro doesn't update their repository often (e.g. Debian/Ubuntu).

I would not recommend uninstalling pip.

1 Like

I do, but that is veering off-topic for this conversation.

I think @cvazeem wants a command to uninstall the PIP certbot, not the PIP package from Python.

I offered an answer in the other topic.

3 Likes

My intention was not to start a discussion :wink:

Earlier I asked to be more specific. Therefore I answered the question as it was asked :slight_smile:

2 Likes

Regarding PIP:

There are multiple ways to install with PIP.

If you followed the instructions on https://certbot.eff.org:
1- Certbot was installed into a virtualenv contained in /opt/certbot/
2- There is a symlink from /usr/bin/certbot to /opt/certbot/bin/certbot

That can be confirmed by doing:

ls -alh /usr/bin

That will show you what Certbot links to. If it links to /opt/certbot/bin/certbot, you followed the instruction (yay!). The safest option (IMHO) would be to simply delete the symlink in /usr/bin and then install snap.

You could also just install via Snap and then check the /usr/bin to see if the symlink was overwritten to the snap version. (I believe snap uses a symlink; it is possible that it uses a prioritized bin directory in the shell configuration)

If you did not install Certbot into a virtualenv, but instead into the User or System Python packages systems... That can be somewhat advanced to remove safely. The only tips I can give in that situation, is checking which Certbot gets invoked (which certbot, followed by ls -alh {that path}) and checking your shell configurations. Aside from that, good luck!

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.