magento-malware-scanner icon indicating copy to clipboard operation
magento-malware-scanner copied to clipboard

pip vs yum python

Open magenx opened this issue 6 years ago • 4 comments

you need to check if python packages already installed and managed with yum or apt, instead of re-installing them with pip. this will break other python projects.

magenx avatar Mar 06 '18 09:03 magenx

Indeed! Want to make a PR for the docs?

gwillem avatar Mar 06 '18 10:03 gwillem

probably create local env?

magenx avatar Mar 06 '18 10:03 magenx

That's the best method, which I also use locally. However, it takes quite a few steps to set up which are also different for several Linux distro's. So to keep the instructions easy, I have omitted that so far.

But feel free to submit good instructions for Centos?

gwillem avatar Mar 06 '18 10:03 gwillem

Using pip-safe (uses virtualenvs seamlessly) in CentOS 7 and 8:

sudo yum install https://extras.getpagespeed.com/release-el$(rpm -E %{rhel})-latest.rpm
sudo yum install pip-safe

Then:

sudo pip-safe --system install mwscan

This installs symlink into /usr/local/bin/mwscan, so simply typing mwscan works fine (of course, provided that /usr/local/bin dir is in the PATH.

Alternatively, to install for current user only:

pip-safe --system install mwscan

This installs symlink over to ~/.local/bin/mwscan, so typing mwscan will work only for that user.

dvershinin avatar Jan 03 '20 03:01 dvershinin