# Python PIP installer



## Phishfry (Sep 18, 2017)

I tried out an Web Control Panel the other day that had decent instructions for setup. It did use the Python `pip` installer. Is this bad? Does pip work with pkgng or are these rouge softwares now on the system? It was just a test machine so no big deal. I just wonder the integration between pip and `pkg` if any.


----------



## SirDice (Sep 18, 2017)

Phishfry said:


> Does pip work with pkgng


PIP has no concept of the host's package manage system.


----------



## Phishfry (Sep 18, 2017)

So in addition to the questionable repositories used for downloading these programs they are also a security risk because the packaging system does not recognize them. Is that a fair statement? Can a port be built for programs using pip installs?


----------



## SirDice (Sep 18, 2017)

Phishfry said:


> So in addition to the questionable repositories used for downloading these programs they are also a security risk because the packaging system does not recognize them. Is that a fair statement?


I'd say that's a fair statement because you can't track versions using either pkg-version(8) or pkg-audit(8).




> Can a port be built for programs using pip installs?


Not sure about direct PIP installs, but the framework does allow the use of Python's distutils (setup.py). 

https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/using-python.html


----------



## Oko (Sep 19, 2017)

Phishfry said:


> I tried out an Web Control Panel the other day that had decent instructions for setup. It did use the Python `pip` installer. Is this bad? Does pip work with pkgng or are these rouge softwares now on the system? It was just a test machine so no big deal. I just wonder the integration between pip and `pkg` if any.


You should use host pkg management system to install appropriate Python version 2.7.14 or 3.6.2. (they should be able to coexist) py27-virtualenv or py36-virtualenv and py27-pip or py36-pip. The rest of the stack could be added by pip and you can adjust installation path so that no root privileges are needed. I am not sure how well pip works on FreeBSD. On Red Hat works rock solid. It is not integrated with yum. On OpenBSD it is useful for simple things. However one could not install numpy or scipy using pip on OpenBSD. Simply put pip expects you to run Linux.


----------

